Remove specific email from one or all mailboxes


If you need to remove specific email from one or all mailboxes on an exchange server you don’t need to attach all of those e-mail boxes in your Outlook. You can use powershell to search for those email, move them to an other mailbox (if you want) and delete the email from the mailboxes.

First, you need to create a powershell session to your exchange server in order to get access to the right commandlets.

Next, give your account the necessary permissions to access the Mailboxes on the exchange mailbox servers.

To check if a certain mail message exists in a mailbox use the get-mailbox and search-mailbox commandlet.

Be carefull if you want to perform this action on all mailboxes for it can become a performance issue on your exchange servers. To do so use this command:

As you can see I use a Journaling mailbox for archiving purpose and it contains the same message.

To delete those e-mails can be a little bit dangerous as you cannot see what the message is. Better is to move those e-mails to an folder and then delete them. With this approach you can recover the e-mail if you need to.

A better idee is to archive the email to a .pst file for further reference. This is easy to review and cleanup.

Good luck and succes.




Leave a Reply

Your email address will not be published. Required fields are marked *