Solved

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

Posted on 2014-04-28
2
540 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Mailbox Overload?
Changing a few Outlook Options can help keep you organized!
how to add IIS SMTP to handle application/Scanner relays into office 365.
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…

724 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