EXO: Change recoverable items retention policy to 30 days for all mailboxes

Copper Contributor



I read the following article that explains how to change how long permanently deleted items are kept for Exchange Online. The commands provided there are through PowerShell either by targeting a specific mailbox, piping the cmdlet to all existing mailboxes. However these commands are a one-shot, and would need to be repeated if I want to change the default from 14 days to 30 days also for all new mailboxes that didn't exist when the command was run for the first time. 


Is it somehow possible to change the default retention policy to keep recoverable items longer than 14 days? (which would auto-apply to any mailboxes in the organization, including ones that are created later)

I noticed the "Recoverable Items 14 days move to archive" retention tag in Exchange Online, but somehow seem unable to change it, neither can I create a new retention tag for the "Recoverable Items folder" type. 


Thanks a lot!

3 Replies
best response confirmed by Bart Billiet (Copper Contributor)

You haven't linked any article, so I'll just assume you are talking about the RetainDeletedItemsFor setting, which controls the amount of time messages are kept in the Purges folder. If so, you can pre-configure this setting for any newly created mailboxes by changing the corresponding parameter of the Mailbox plan(s):


Get-MailboxPlan | Set-MailboxPlan -RetainDeletedItemsFor 30


The "Recoverable Items 14 days move to archive" applies to the "Deletions" folder, which is a level "higher" than the Purges folder.

Whoops, you guessed correctly, I was talking about the RetainDeletedItemsFor parameter. Thanks a lot for pointing out the MailboxPlan, looks like this will help!


I'm not sure I understand what you mean about the "Recoverable Items 14 days move to archive" policy. If this is applying to the Deletions (Recoverable items) folder, what does it mean that items get moved to archive after 14 days? Would it mean the item stays in the user's mailbox for 14 days, and (if the RetainDeletedItemsFor parameter is set to a value larger than 14) the item is then moved to the online archive mailbox after 14 days (until it is purged after maximum 30 days)? 

If the user has an Archive mailbox, items in that folder (Deletions/"Recover Deleted Items") will be moved to the corresponding folder in the Archive mailbox after 14 days. The idea is to clean up space in the primary mailbox as those items count against the RecoverableItemsQuota.


The RetainDeletedItems for duration still applies, so they will eventually end up in the Purges folder (either in the primary mailbox or in the archive one).