Exchange 2010 Powershell script to clear recovery items

Close-up of the mail app icon on a smartphone screen
Recovery items in users mailboxes can substantially increase the overall size of your store. If you would like to clear these out of all users mailboxes create the following two script files to use Flush_recovery_items.cmd C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command “. ‘c:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps1’; Connect-ExchangeServer -auto; cd c:\scripts\ ; .\Flush_recovery_items.ps1” Flush_recovery_items.ps1 Get-User -RecipientType UserMailBox | Search-Mailbox -SearchDumpsterOnly -DeleteContent -confirm:$false You will be prompted to continue and can select Y to go mailbox by mailbox, or press A to continue deleting from All mailboxes

Practical IT tips, straight to your inbox

Microsoft 365 updates, security alerts and plain-English tech advice for small businesses, emailed when we publish a new article.

We don’t spam! Read our privacy policy for more info.