I had a lot of difficulty changing the deleted items retention in Office 365 Exchange from the default 14 days to 30. I would change it but it still showed as 14 days. Finally at the suggestion of Microsoft Office 365 Support, I removed the retention, then re-added it. Finally it showed the correct value.
Here are the PowerShell commands that worked to change deleted items retention for one account:
Get-mailbox [email protected] | fl name, UseDatabaseRetentionDefaults, RetainDeletedItemsFor
Set-Mailbox [email protected] -UseDatabaseRetentionDefaults $False
Set-Mailbox [email protected] -RetainDeletedItemsFor 30
Start-ManagedFolderAssistant [email protected]
Get-mailbox [email protected] | fl name, UseDatabaseRetentionDefaults, RetainDeletedItemsFor
If you know you need UseDatabaseRetentionDefaults $true, you can probably re-enable that afterwards, but since only one mailbox had that set to $true, after changing it to $false, I left it alone.
This 2014 article confirms the conflict if UseDatabaseRetentionDefaults is $true:
https://www.anywherexchange.com/2014/10/increasing-mailbox-deleted-items.html
That’s odd. MS put out an article in 2015 saying that the default was moving from 30 to indefinitely, and that it would “affect all existing and new users in your Office 365 tenant who have been assigned the Default MRM Policy.”
https://www.microsoft.com/en-us/microsoft-365/blog/2015/02/20/extended-email-retention-deleted-items-office-365
Yet, as you say, it’s 14, and you can change it up to 30. Did the above link slip in from an alternate universe?
@Rick, it’s confusing, but here is how I understand it:
There are two folders in question. The visible Deleted Items folder and the hidden Recoverable Items folder. When you delete an item from Deleted Items, it moves to Recoverable Items.
The Q&A at the bottom of the article you cite states, “No the change does not apply to the Recoverable Items folder. It is only for the visible Deleted Items folder.” So this MRM policy is about the VISIBLE folder only. By default, you can now leave stuff in Deleted Items indefinitely (not a good idea in my opinion, but I guess some users work that way).
If and only if you delete an item from Deleted Items (or Empty the Deleted Items folder, as I do daily), the “permanently deleted” items are recoverable for a short while, 14 days by default, or up to 30 days if you use the Powershell commands in the article above.
I think there is a way to move items from Recoverable Items to the Archive but I’m not doing that. Basically I want my deleted stuff to have a 30-day Undo option, then to disappear.
OK, thanks for clarifying. Yes, very tricky indeed, especially when MS uses a term like “RetainDeletedItemsFor” when they might have better named it “RetainRecoverableItemsFor.”