Skip to content

Instantly share code, notes, and snippets.

@PrateekKumarSingh
Last active March 16, 2016 19:33
Show Gist options
  • Save PrateekKumarSingh/b029c3085e266ff1ef4a to your computer and use it in GitHub Desktop.
Save PrateekKumarSingh/b029c3085e266ff1ef4a to your computer and use it in GitHub Desktop.
Get-MailboxStatistics -Database DBNAME | where {$_.DisconnectReason -eq “SoftDeleted”} | `
%{Remove-StoreMailbox -Database $_.database -Identity $_.mailboxguid -MailboxState SoftDeleted -Confirm:$false}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment