// Exchange Online PowerShell module required //
// Check mailbox size, including retained items //
Get-MailboxFolderStatistics "$ExchangeGUID" -FolderScope RecoverableItems | ft Name,Foldersize
Name FolderSize
---- ----------
Recoverable Items 0 B (0 bytes)
Audits 303.8 MB (318,570,174 bytes)
Calendar Logging 0 B (0 bytes)
Deletions 104 MB (109,083,721 bytes)
DiscoveryHolds 99.51 GB (106,851,323,576 bytes)
SearchDiscoveryHoldsFolder 22.42 MB (23,508,575 bytes)
SearchDiscoveryHoldsUnindexedItemFolder 110.1 MB (115,490,278 bytes)
Purges 1.487 MB (1,559,612 bytes)
SubstrateHolds 0 B (0 bytes)
Versions 79.31 MB (83,165,042 bytes)
// Total Deleted Items Size / Discovery Holds over quota - mail delivery will fail randomly //
// Disable litigation hold for user //
Set-Mailbox -identity "$ExchangeGUID" -LitigationHoldEnabled $False
// Disable settings that delay deletion of litigation hold content //
Set-Mailbox "$ExchangeGUID" -RemoveDelayHoldApplied
Set-Mailbox "$ExchangeGUID" -RemoveDelayReleaseHoldApplied
// verify setting //
Get-Mailbox "$ExchangeGUID" | fl DelayHoldApplied,DelayReleaseHoldApplied
// start managed folder assistant to force MRM to process previously retained items //
Start-ManagedFolderAssistant -identity "$ExchangeGUID"
// Check folder statistics to verify reduction in mailbox size - this will take some time (day or more) to reflect //
Get-MailboxFolderStatistics "$ExchangeGUID" -FolderScope RecoverableItems | ft Name,Foldersize