Change the Retention Time of Office 365 Recoverable Items

 

Red Hourglass

 

More Time to Recover

When a user permanently deletes an item from their mailbox by shift-deleting an item, deleting an item from the Deleted Items folder or emptying the Deleted Items folder, the item is moved into a hidden folder called Recoverable Items for a period of time.

 

By default this period of time is 14 days. It can be extended to a maximum of 30 days after which the item is permanently gone unless the mailbox is under in-place hold or litigation hold.

Unfortunately there is currently no ability to change this setting in the Office 365 administrator console. However, the PowerShell procedure is very easy to perform as we'll see below.

 

Enter Your Credentials

The first step is to open PowerShell and log in to Office 365. I've described how to do this in a previous article - Connect to Office 365 and Azure with PowerShell.

 

See Your Current Recovery Settings

To see the current recovery settings for one mailbox run this command:

Get-Mailbox  | FL RetainDeletedItemsFor

 

Recovery Time Settings for One Mailbox

 

To see the current recovery settings for all mailboxes run this command:

Get-Mailbox -ResultSize unlimited -Filter {(RecipientTypeDetails -eq 'UserMailbox')} | FL Name,RetainDeletedItemsFor

 

Recovery Time Settings for All Mailboxes

 

Change the Recovery Settings

To set the recovery settings for a single mailbox to 30 days run this command:

Set-Mailbox -Identity -RetainDeletedItemsFor 30

To set the recovery settings for all of your mailboxes to 30 days run this command:

Get-Mailbox -ResultSize unlimited -Filter {(RecipientTypeDetails -eq 'UserMailbox')} | Set-Mailbox -RetainDeletedItemsFor 30

 

Change and View Recovery Time on All Mailboxes

 

A Couple of Caveats

  • The next time you create a new user the mailbox will be set up with the 14 day recovery period so you'll have to run the PowerShell commands again.
  • If the user purges the mailbox item in the Recoverable Items folder in Outlook or OWA it is immediately gone unless the mailbox is under in-place hold or litigation hold. A third-party backup solution also prevents this from happening.

 

Final Thoughts

Just changing the Recoverable Items setting will not protect you from data loss with a truly malicious user. It can reduce administrative overhead by giving employees more time to recover without having to request a restore from backup.
 

Subscribe to our Office 365 newsletter.

By |2017-05-20|Office 365|