Forum Discussion
How to clear the Discovery Holds folder
- 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.
Hi this is something I've been looking for.
can you help me on this? i tried what you did but it doesnt work for me.
Set-Mailbox -Identity xyz -RetainDeletedItemsFor 0
Start-Managedfolderassistant -Identity xyz
Start-Managedfolderassistant -Identity xyz
Get-Mailbox xyz | FL DelayHoldApplied,DelayReleaseHoldApplied
>>DelayHoldApplied : False
>>DelayReleaseHoldApplied : False
Get-MailboxFolderStatistics -Identity xyz | select name,foldersize
Get-RetentionCompliancePolicy | foreach {Set-RetentionCompliancePolicy -identity $_.name -AddExchangeLocationException xyz}
Start-Managedfolderassistant -Identity xyz
Start-Managedfolderassistant -Identity xyz
Get-MailboxFolderStatistics -Identity xyz | select name,foldersize
Start-Managedfolderassistant -Identity xyz
Start-Managedfolderassistant -Identity "email address removed for privacy reasons"
Get-MailboxFolderStatistics -Identity xyz | select name,foldersize
Before running these commands, you need to exclude the IDs on compliance retention policy.