troubleshooting Question

Need to delete email from all users mailboxes

Avatar of blackmores
blackmoresFlag for Australia asked on
16 Comments1 Solution19311 ViewsLast Modified:
I have an email that has been sent to everyone in the company. I want to delete this email from everyone's computer to minimise damage. A log of who it deleted from, and copies of the emails in a dedicated mailbox would be great too.

Our environment is Exchange 2010 SP1, so that means Exhcange 2007 or Exchange 2010 process for doing this is different.

I have tried running the following commands but had little success.
Get-Mailbox -Server "*SERVER*" | Search-Mailbox -TargetMailbox "*SEARCHACCOUNT*" -TargetFolder "*EMAILSDELETED*" -SearchQuery 'Subject:"*SUBJECT CONTAINS THIS*" AND Body:"*BODY CONTAINS THIS*"' -deletecontent
Get-Mailbox -Server  “*SERVER*” | Search-Mailbox -SearchQuery ‘Subject:”*SUBJECT CONTAINS THIS*” Body:"*BODY CONTAINS THIS*"‘ -DeleteContent

- I have been running the command from the enterprise admin credentials.
- The first command returned this result:
The input object cannot be bound to any parameters for the command either because the command does not take pipeline in
put or the input and its properties do not match any of the parameters that take pipeline input.
    + CategoryInfo          : InvalidArgument: (*MAILBOXNAME*:PSObject) [Search-Mailbox], ParameterBindingException
    + FullyQualifiedErrorId : InputObjectNotBound,Search-Mailbox

-The second command returned a similar response.
-When i run the command without the deletecontent switch, but include targetmailbox i can see it finds a number of these emails.

Any help would be appreicated.
Solutions Architect

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 16 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 16 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros