?
Solved

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

Posted on 2014-04-28
2
Medium Priority
?
550 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 2000 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

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

A list of top three free exchange EDB viewers that helps the user to extract a mailbox from an unmounted .edb file and get a clear preview of all emails & other items with just a single click on mailboxes.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
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…
This video discusses moving either the default database or any database to a new volume.
Suggested Courses
Course of the Month8 days, 18 hours left to enroll

764 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