Solved

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

Posted on 2014-04-28
2
516 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
Comment Utility
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
Comment Utility
Hello,

Try this:

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

-JJ
0

Featured Post

Are end users causing IT problems again?

You’ve taken the time to design and update all your end user’s email signatures, only to find out they’re messing up the HTML, changing the font and ruining the imagery. What can you do to prevent this? Find out how you can save your signatures from end users today.

Join & Write a Comment

Disabling the Directory Sync Service Account in Office 365 will stop directory synchronization from working.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
To show how to generate a certificate request in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Servers >> Certificates…
how to add IIS SMTP to handle application/Scanner relays into office 365.

763 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now