Delete all of the Mailbox content using Exchange PowerShell

Hi ;
In occasional cases you may be needing to delete the mailbox content from an user;

In order to do so run the following from the Exchange Console /

Verify prior using the second command the items :

Get-MailboxFolderStatistics -Identity | Select FolderPath,ItemsInFolder

Run the serach to delete
Search-Mailbox -Identity "Example User" -SearchQuery "kind:meetings" -DeleteContent
and for finishing empty dumpster :

Search-mailbox -identity "" -SearchDumpsterOnly -DeleteContent


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.