Forum Discussion
venkatkirankona
Dec 10, 2022Brass Contributor
How to clear the Discovery Holds folder
To find whether this discovery holds folder is completely full, use the below-mentioned command. Step 1: Connect-ExchangeOnline and then, Step 2: Get-MailboxFolderStatistics -Identity us...
- May 23, 2023
Great post, thank you. This helped me when both RecoveryItems and DiscoveryHolds were full. We had a lot of retention policies, so using this command excluded them from all polices:
Get-RetentionCompliancePolicy | foreach {Set-RetentionCompliancePolicy -identity $_.name -AddExchangeLocationException <user>}
Also, it can take a lot more than a few minutes if the mailbox has a lot of items (in my case, 100GB). It's going very slow for me, maybe 1GB every hour or two.
koakd540
May 23, 2023Copper Contributor
Great post, thank you. This helped me when both RecoveryItems and DiscoveryHolds were full. We had a lot of retention policies, so using this command excluded them from all polices:
Get-RetentionCompliancePolicy | foreach {Set-RetentionCompliancePolicy -identity $_.name -AddExchangeLocationException <user>}
Also, it can take a lot more than a few minutes if the mailbox has a lot of items (in my case, 100GB). It's going very slow for me, maybe 1GB every hour or two.
- venkatkirankonaMay 24, 2023Brass ContributorTry to run this "start-managedfolder" command 2 times at once and repeat every 5 mins.
Thanks for the response btw and good to see that this is helpful.- koakd540May 24, 2023Copper Contributor
This is working perfectly! I came in this morning and the deletions had stalled, tried your method of running it twice every 5 minutes and it's dropped from 99GB to 58GB in about an hour. Here's a snippet to do this every 5 mins automatically, and report the size of the folders:
while ($true) { Start-ManagedFolderAssistant -Identity <email address removed for privacy reasons> Start-ManagedFolderAssistant -Identity <email address removed for privacy reasons> sleep 300 Get-MailboxFolderStatistics <email address removed for privacy reasons> -FolderScope RecoverableItems | Ft Name,FolderAndSubfolderSize }
- Kundrak96Mar 05, 2025Copper Contributor
Thank you so much, I’m really grateful.
Along with the main solution, I have used your script adapted to my case, and it has been the definitive solution. After a few runs, in about 30 minutes, the folder size has reduced from 105GB to 30GB and it’s still decreasing!