Delete email from users Inboxes
Hi This morning, an email went out to a whole bunch of people that shouldn't have! HR and management have now asked us if there's a way to remove the message from users' mailboxes before Monday morning. There are hundreds of mailboxes, so going into each one is not an option...any idea? We have the sender, recipient, and subject of this offending message. Running Exchange 2007 SP2.
May 8th, 2011 4:07pm

See below. Use EMS powershell to do this. http://technet.microsoft.com/en-us/library/bb266964(EXCHG.80).aspx Sukh
Free Windows Admin Tool Kit Click here and download it now
May 8th, 2011 5:16pm

Thanks...so I would use this command below: Get-Mailbox -Database DB1 | Export-Mailbox -TargetMailbox ExportMailbox -TargetFolder VirusData -SubjectKeywords "Virus message" -DeleteContent Do you know how I would use this command if I had the users in a text/CSV file? Also, does this work on one mailbox at a time, or can do multiple?
May 8th, 2011 6:18pm

See below. http://www.kevintaber.com/2009/06/09/search-for-and-delete-emails-in-exchange-2007-mailboxes-using-powershell/ Below. Run for all users, dont use the target mailbox if you want to delete. Will work for all mailboxes in one go. Sukh
Free Windows Admin Tool Kit Click here and download it now
May 8th, 2011 7:08pm

Good info regarding Powershell, however, if you are interested in a 3rd party product to do this and more, check out Lucid8's DigiScope http://www.lucid8.com/product/digiscope.asp Troy Werelius www.Lucid8.com
May 9th, 2011 10:43am

Ok, so this command: Export-Mailbox -TargetFolder VirusData -SubjectKeywords "Virus message" -DeleteContent But how do I apply this to a text file of users? Also, if I did run the below on an entire store (or Get-mailbox -Mailboxserver Server1 for an entire server) - how much effect would this have on the resources of the server? Pretty heavy hit? And are you sure it does all mailboxes in one go rather than just one after the other? Get-Mailbox -Database DB1 | Export-Mailbox -TargetFolder VirusData -SubjectKeywords "Virus message" -DeleteContent
Free Windows Admin Tool Kit Click here and download it now
May 9th, 2011 6:04pm

Hi, You could run this command: Get-Mailbox -Database DB1 | Export-Mailbox -SubjectKeywords "Virus message" -DeleteContent This example first gets all the mailboxes on database DB1, searches for items that contain the string "Virus message" in the subject, and deletes those items without exporting the items to another mailbox. >>Also, if I did run the below on an entire store (or Get-mailbox -Mailboxserver Server1 for an entire server) - how much effect would this have on the resources of the server? Pretty heavy hit? And are you sure it does all mailboxes in one go rather than just one after the other? Don’t worry about the performance. It only takes between 2 and 5% of CPU in steady state. You could monitor the performance follow this article. The new Search in Exchange Server 2007 Please remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
May 10th, 2011 4:14am

Thanks Jerome, but I'm still not sure how I'd apply this to a TEXT file of users? Also, is there any way I can have an output so I can see how far the script has gone?
Free Windows Admin Tool Kit Click here and download it now
May 13th, 2011 10:44pm

Thanks Jerome, but I'm still not sure how I'd apply this to a TEXT file of users? Also, is there any way I can have an output so I can see how far the script has gone? Hi Digitalco, As I know, you could only use the Switch Parameter “confirm” and “ whaIf” to interact with you. But still can see how far the script has gone. I think the “Development Forum” which would be the most relevant forum for this question. Development Forum: http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/threads/Please remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
May 15th, 2011 10:23pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics