KB ID 0000343
Problem
You have a nasty email that contains a virus or some offensive content and you want to delete ALL instances of it.
Solution
1. Log on as the domain administrator > Open the Exchange Command Shell.
2. First grant the correct rights to the administrator account.
This gives the Administrator FULL rights to ALL mailbox’s
[box]Get-mailbox -Database “Mailbox Database”| add-mailboxpermission -user administrator -AccessRights FullAccess[/box]
Note: this assumes your mailbox database is called “Mailbox Database”.
3. Then locate and delete the emails containing “yoursearchtext”.
[box]Get-Mailbox -Database “Mailbox Database” | Export-Mailbox -SubjectKeywords “yoursearchtext” -DeleteContent[/box]
Note: If you are unable to use the export-mailbox command then see here
Related Articles, References, Credits, or External Links
NA