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 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
}
venkatkirankona
May 24, 2023Brass Contributor
This is great koakd540. Thank you 🙂