Symptoms:
- “Unable to Delete Items”
- Deleted items are being restored automatically
Step 1: Check size of the recoverable items folder
- get-mailboxfolderstatistics -identity user -folderscope recoverableitems | FL name,folderpath,folderandsubfoldersize,storagequota
Step 2: Check for Holds
- MS guide for identifying holds
Step3: Clear it out. I found two methods, one seems a lot more aggressive and complicated than the other.
- a) The Simple slow one, This worked for Caroline’s it was a global compliance policy identified in step 2, the below guide is simply exempting from the policy, setting your own retention and letting it process. Steps like removing delay holds and single item retention may still be needed and are in the guide for b.
- b) The more aggressive one, remove all hold, kill user access and use a compliance search script to directly purge it. I haven’t done this one. Great info on holds and how to remove then though.
Step 4: Wait and Check
- Check with step one command
Useful commands
Get recoverable items data
- get-mailboxfolderstatistics -identity user -folderscope recoverableitems | FL name,folderpath,folderandsubfoldersize,storagequota
Search for basically all holds
- get-mailbox user | FL hold
See the global compliance policies
- Get-RetentionCompliancePolicy
Look up the GUID from the inplace results to find the name and details of a global policy
- Get-RetentionCompliancePolicy GUID with no prefix or suffix -DistributionDetail | FL Name,*Location
Exempt a user from the policy
- Set-RetentionCompliancePolicy -Identity GUID with no prefix or suffix -AddExchangeLocationException user
Find and remove Delay Holds (There are applied when you change a hold ie exempt from above policy)
- Get-Mailbox user | FL DelayHoldApplied,DelayReleaseHoldApplied
- Set-Mailbox user -removedelayholdapplied
Turn off single item recovery (need to purge) and change retention period after excluding
- set-mailbox user -singleitemrecoveryenabled $false
- set-mailbox -identity user -retaindeleteditemsfor 10
- get-mailbox user | Format-List SingleItemRecoveryEnabled,RetainDeletedItemsFor
Start Processing once new policies are applied
- Start-Managedfolderassistant -identity user
A7D92094494754488AEB6819B0604F6D00000A2EB92C0000