How to delete messages out of Exchange 2007/2010 mail stores.

This is best for when you need to kill off all traces of a message on your Exchange 2007/2010 server.  Examples include e-mail virus, obnoxious chain letters or even angry employees.

From exchange management shell(run as administrator) use the following commands.

For Global:

Get-Mailbox -Server MAILSERVER | Add-MailboxPermission -User Yourusername -AccessRights Fullaccess -InheritanceType all
Get-Mailbox -Server MAILSERVER | Export-Mailbox -SubjectKeywords “The Subject Line” -StartDate “02/28/2012″ -DeleteContent

For one specific user(rage quit then change your mind after sending?):

Get-Mailbox -Identity targetuser | Add-MailboxPermission -User Yourusername -AccessRights Fullaccess -InheritanceType all
Get-Mailbox -Identity targetuser | Export-Mailbox -SubjectKeywords “The Subject Line” -StartDate “02/28/2012″ -DeleteContent

Leave a comment

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

CAPTCHA ImageChange Image