I have never run it that way, but my understanding is it will delete any message with any of those words. I do what you are doing this way:
Get-Mailbox -Server "ServerName" | Search-Mailbox -SearchQuery 'Subject:"FW: Your student-loan assistance package"' -DeleteContent I got to head to a meeting, so the above was fast typed..dig into the way above and test before you start deleting. From: listsad...@lists.myitforum.com [mailto:listsad...@lists.myitforum.com] On Behalf Of Kelsey, John Sent: Wednesday, March 11, 2015 11:34 AM To: 'exchange@lists.myitforum.com' Subject: [Exchange] Removing an email from all mailboxes Single Exchange 2007 server. We had a little email virus 'outbreak' yesterday in which a message with the subject of 'check' and a bad zip file got passed around to the bulk of the mailboxes. I want to remove all of the bum messages and it looks like this is what I need? Get-Mailbox -ResultSize Unlimited | Export-Mailbox -ContentKeywords "check the document as an attachment" -DeleteContent Will that just remove the messages with those specific content keywords, or will that remove ANY message that has any of those words in the subject or body? Don't want to get carried away! :) Thanks all. *************************************** John C. Kelsey Penn Highlands DuBois *: 814.375.3073 * : 814.375.4005 *: jckel...@phhealthcare.org<mailto:jckel...@phhealthcare.org> *************************************** [PHH ESig Logo 150dpi] This email and any attached files are confidential and intended solely for the intended recipient(s). If you are not the named recipient you should not read, distribute, copy or alter this email. Any views or opinions expressed in this email are those of the author and do not represent those of Penn Highlands Healthcare or its affiliates.. Warning: Although precautions have been taken to make sure no viruses are present in this email, the company cannot accept responsibility for any loss or damage that arise from the use of this email or attachments.