Is there a way to remove a particular email from Exchange? I have over 200 users that received a spam email that i want to remove from their Outlook

Is there a powershell script or a way to remove an email from everyone by the sender's email address?
CiscoAznAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Waddah DahahCommented:
if you are using Exchange 2010 open Exchange PowerShell and execute following command;

get-mailbox | Search-Mailbox -SearchQuery ‘from:virussender@virus.com ‘ -TargetMailbox “adminmailbox” -TargetFolder “DeleteVirus” -LogLevel Full –DeleteContent

Regards,
Waddah
0
CiscoAznAuthor Commented:
what is the adminmailbox? the target is everyone's mailbox and is the "DeleteVirus" a folder I need to create?
0
Guy LidbetterCommented:
The admin mailbox is whatever mailbox name you put in there...it could be yours or a another persons. The target folder is the folder in which to put a copy of the deleted email in the admin mailbox specified... you don't need to do this... you could just -deletecontent but if the email hit is wrong you'd need a copy to put back!

The search query could also be the subject name - which is probably a better target...   i.e. -searchquery 'Subject:"Subject in here"'
0
What were the top attacks of Q1 2018?

The Threat Lab team analyzes data from WatchGuard’s Firebox Feed, internal and partner threat intelligence, and a research honeynet, to provide insightful analysis about the top threats on the Internet. Check out our Q1 2018 report for smart, practical security advice today!

Waddah DahahCommented:
Excellent answer Guy!
Thank you.
0
CiscoAznAuthor Commented:
the question here is the source is everyone and not a specific mailbox like an adminmailbox. Just confused.
0
Guy LidbetterCommented:
OK... a better break down...

Get-Mailbox | Search-Mailbox "Get every single mailbox in organization (add "-resultsize unlimited" if you have more than 1000) - Then search them!!!"
-TargetMailbox  "A mailbox where you want a copy of the found emails to be sent" -Optional
-TargetFolder "Folder inside said mailbox - where you would like the found emails to be saved - you do not need to create this" -optional
-SearchQuery "what you are looking for"
-DeleteContent "Delete any found emails that match above query - it doesn't delete everything everywhere"
-Loglevel full "Tell me everything you find out about everything you find"
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CiscoAznAuthor Commented:
Thanks guys!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Exchange

From novice to tech pro — start learning today.

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.