Forum Discussion
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 user | select name,foldersize
Note: This DiscoveryHolds folder is having a limit of 100 GB. If it is full, we will get issues like "Unable to clear deleted items folder", "deleted items are getting auto-restored" etc.,
One of the reasons for this folder is full: If Organization Hold is turned on(All Exchange mailboxes are selected in Compliance Retention Policy) or the Individual ID is selected on Compliance Retention Policy.
Solution:
Please try the below-mentioned steps to overcome this issue.
Step 1: Exclude the DiscoveryHolds full ID in the Compliance Retention policy or run the below-mentioned commands in PowerShell.
Connect-IPPSSession
and then,
Set-RetentionCompliancePolicy -Identity "Compliance Retention Policy Name" -AddExchangeLocationException user
for multiple users,
Set-RetentionCompliancePolicy -Identity "Compliance Retention Policy Name" -AddExchangeLocationException user1, user2, user3
Now on PowerShell,
Connect-ExchangeOnline
and then,
Set-Mailbox -Identity user -RetainDeletedItemsFor 0
and then run the below-mentioned command two times.
Start-Managedfolderassistant -Identity user
Start-Managedfolderassistant -Identity user
After 2-3 minutes, run the below-mentioned commands.
Get-Mailbox "user" | FL DelayHoldApplied,DelayReleaseHoldApplied
If the output is received as true for any above-mentioned holds, then run the below-mentioned commands.
Set-Mailbox user -RemoveDelayHoldApplied
Set-Mailbox user -RemoveDelayReleaseHoldApplied
and then run the below-mentioned command two times.
Start-Managedfolderassistant -Identity user
Start-Managedfolderassistant -Identity user
After 2-3 minutes, this DiscoveryHolds folder will become zero as per the below-mentioned screenshot.
This process helped me a lot. If you have any doubts/concerns/suggestions about this post, please comment below.
Best Regards,
Venkat Kiran Kona.
- nhutsonCopper ContributorVenkat - after a few days of trying to follow this article https://learn.microsoft.com/en-us/purview/ediscovery-delete-items-in-the-recoverable-items-folder-of-mailboxes-on-hold#step-3-remove-all-holds-from-the-mailbox
your method was much faster and easier... thank you!