delete emails from exch 2010 datastores / users mailboxes

I need the ability to search through my exchange 2010 environment and delete emails from users mailboxes. Could be as many as 500 users who recieve a piece of mail that I need to clean from the databases/users mailboxes. Whats the best method to achive this?
Who is Participating?
Manpreet SIngh KhatraSolutions Architect, Project LeadCommented:
Something like this

Get-Mailbox -Database mailboxdb | Export-Mailbox -SubjectKeywords "Virus message" -DeleteContent

Get-Mailbox -Server "Server Name" | Search-Mailbox -SearchQuery 'Subject: "Parameter"' -DeleteContent

- Rancy
DEFclubAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.