Solved

Deleting a certain email in a Store For All users in exchange 2010

Posted on 2014-04-28
2
520 Views
Last Modified: 2014-05-07
How would i go about deleting an email that was sent out to everyone by accident. I have this command line that work for number email subject, but when there is a special character  it doesn't seem to work.

Get-Mailbox -Server  "exchangeserver.cb.smbmi.local" | Search-Mailbox -SearchQuery 'Subject:"test message to delete"  -deletecontent

it doesn't work if the subject has # or any special characters in them. example

Get-Mailbox -Server  "cascbex04.cb.smbmi.local" | Search-Mailbox -SearchQuery 'Subject:"#test# message/test to delete"  -deletecontent

this exchange 2010

how do i get around that.

thanks in advance.
0
Comment
Question by:sirichaiphumirat
2 Comments
 
LVL 3

Accepted Solution

by:
bmurray-vb earned 500 total points
ID: 40027681
As a workaround you can change the query to include a unique portion of the body of the message rather than the subject.  That will work as well.

Get-Mailbox -Server  "cascbex04.cb.smbmi.local" | Search-Mailbox -SearchQuery 'Body:"unique sentence in the body of the email"  -deletecontent
0
 
LVL 37

Expert Comment

by:Jamie McKillop
ID: 40027737
Hello,

Try this:

"Subject:'"#test# message/test to delete'""

-JJ
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Following basic email etiquette rules will help you write a professional email and achieve a good, lasting impression with your contacts.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
Many of my clients call in with monstrous Gmail overloading issues with Outlook. A quick tip is to turn off the All Mail and Important folders from synching. Here is a quick video I made to show you how to turn off these and other folders in Gmail s…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question