There are many articles written about why you need an additional backup when working with Microsoft 365. I guess most of these articles are written by the backup vendor themselves.
But what if you don’t need or want an additional backup? A long time ago I wrote an article about why I love Onedrive and the recycle bin restore possibilities.
But what options do you have when an end-user just deleted all of his email (+20.000 items) and you don’t have an additional backup?
Option 1: Exchange admin center
It’s a very good option, provided you have single item recovery configured. This option is not enabled by default. Please beware you will need to open the Modern exchange admin center, this option is not available in the old admin center.
Let’s check if we can restore some items!
No results… This first option won’t show you any results when you don’t have single item recovery enabled. So when you are reading this article and you realize this setting is not configured, please enable it:
Get-mailbox | Set-Mailbox –SingleItemRecoveryEnabled $true
Option 2: Outlook web access
Restoring deleted items when using outlook web access is also a possibility but restoring +20.000 items? Good luck with that…
It will take you some time when you want to recover all of these items and we all know It Guys/Womens don’t have the luxury of time!
Option 3: Outlook app.
I guess this option is the best option you have for now. The difference between outlook web access and outlook, you can press on Select All. Isn’t that great?
You can restore all items in one click. But again, it will take some time to restore all the items. Hopefully, Outlook won’t crash…
Option 4: PowerShell
I don’t have to tell you, this is my favourite option and probably the best. But before you can launch your PowerShell script, you will need to assign the mailbox import-export permissions to your user. For now, I will add my user to the: Organization Management role.
After we assign the permissions, we still need to install the exchangeonlinemanagement module, if haven’t done this already.
Install-Module ExchangeOnlineManagement
import-Module ExchangeOnlineManagement
Now we have the required module installed, we can connect to Exchangeonline
Connect-ExchangeOnline
Let’s check if the users have some recoverable items first:
Get-RecoverableItems -Identity alias
After we have made sure, there are items that are recoverable.. we can begin restoring the items:
Restore-RecoverableItems -Identity alias
And watch PowerShell go! Within 5 a 10 minutes all + 20.000 items were restored.
All of these 4 options have 1 thing in common. The items you want to restore must be within the retain deleted items time range. The default time range is set at 14 days. That’s not much. We will need to increase it to a maximum of 30 days.
First, let’s check if this option is already configured in your tenant:
Get-mailbox | fl displayname,retaindeleteditemsfor
If the output is 14 days, you will need to change the existing mailboxes to 30 days
Get-mailbox | set-mailbox -retaindeleteditems 30
Please make sure you don’t forget to change the default mailboxplan, to make sure new mailboxes are configured with this increased setting.
Get-MailboxPlan | Set-MailboxPlan -RetainDeletedItemsFor 30
Conclusion:
I am not telling you, you don’t need an additional office 365 backup but if you look at the default restore options that are available… I think it’s pretty good for the SMB and I did not even talk about Litigation hold and retention policies!!! But keep in mind, without additional backup you have max of 30 days of restore time!
Hi there – can you please assist?
I’m running your “Get-RecoverableItems – Identity user@…….. -ResultSize Unlimited” command, and it works great.
It runs (scrolls down for about 6 minutes) and I can see what I think are a LOT of e-mails (probably 25K)
My problem is when I run the actual restore, with “Restore-RecoverableItems – Identity user@……”
I get a “ConvertFrom-Json : Invalid JSON primitive” error (there is more after this…)
Does this make sense to you at all?
Thanks in advance,
Ashley