This is part of an ongoing series of Office 365 Best Practices which should in place for every organization – big or small, business or non-profit.
By default, the retention for permanently deleted items in 365 is 15 days – after which the deleted item is lost forever. If you have the proper licensing and retention policies in place – which I’ll cover at a later time – then you can basically keep everything forever. But that requires some monetary investment in the proper licensing, and I wouldn’t say that’s necessary for every – or even most – organizations.
However, we can double the deleted items retention time to 30 days for free! This is useful for two reasons: 1) Gives users more leeway to recover something important they may have accidentally deleted permanently, and 2) gives admins more time to recover deleted mail in case of user termination – some offboarded users take a “scorched earth” approach on their way out and delete everything.
To lengthen deleted item retention from 15 to 30 days, follow this process:
1. Connect to Exchange Online Powershell. I have a guide on how to do that here.
2. To up retention to 30 days, run this command with:
Get-Mailbox -ResultSize unlimited -Filter “RecipientTypeDetails -eq ‘UserMailbox'” | Set-Mailbox -RetainDeletedItemsFor 30
…and done! All existing mailboxes have been updated to 30 days of retention for permanently deleted items.
But this only applies to existing inboxes – new inboxes will still be created with 15 days of retention. Can we configure Exchange Online to ALWAYS open new mailboxes with 30 days of retention? Of course! We just need to specify this in a mailbox plan:
1. Connect to Exchange Online Powershell if not still connected.
2. Run this command to view the default mailbox plan:
Get-MailboxPlan | Format-Table DisplayName,IsDefault -Auto
3. After you’ve identified the default mailbox plan, run this command:
Set-MailboxPlan -Identity <MailboxPlanIdentity> -RetainDeletedItemsFor 30
…and Done! The default plan now reflects 30 days, and all new inboxes will be created to automatically open with 30 days of deleted item retention.
And if you’re the “prove it” type, like me, we can validate by running this command:
Get-MailboxPlan | Format-List DisplayName,IsDefault,RetainDeletedItemsFor