Recently i had a situation where a user with a shared mailbox which had a ludicrous number of items. He recently started in the role and wanted to “start fresh” – but items could not be deleted.
A quick investigation found that litigation hold had been enabled for the mailbox (in addition to our org wide retention policies). It was unclear why the litigation hold had been enabled – and the reasons were lost due to staff turnover.
Finding and fixing the issue included:
- get-mailbox <identity> | fl *hold*
- This command will show the status of all holds on that specific mailbox. In my case, i could see that “LitigationHoldDate” and “DelayHoldApplied” were populated
- In order to remove these i ran
- get-mailbox <identity> | Set-Mailbox -LitigationHoldEnabled $false
- get-mailbox <identity> | Set-Mailbox -RemoveDelayHoldApplied
- After running these steps – i was still not able to delete items from the mailbox, so i ran
- get-mailboxFolderStatistics <identity> -FolderScope RecoverableItems | FL Name,FolderAndSubfolderSize,ItemsInFolderAndSubfolders
- and could see that the recoverable items and purges were both at 100GB – meaning that the quota, which also applied to delete items was full – so i could not yet delete anything more
- In order to speed up the process of the managed folder assistant doing its job, run
- Start-ManagedFolderAssistant -Identity <identity> -FullCrawl -HoldCleanup
- After some time, if you re-run the get-mailboxFolderStatistics command, you should see the recoverable items and purges start to come down
- Since this mailbox was full and is receiving a very high volume of new mail – the 100GB limit was going to be hit again very quickly – so in order to mitigate that for this initial cleanup, i then set
- Set-Mailbox -Identity <identity> -RetainDeletedItemsFor 1
- This will only detain deleted items for 1 day in the dumpster before purging
- I will set this back to 30 days once the initial cleanup is complete and the mailbox is back to “normal” operation.