Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I don't pretend to be an expert at this, but I have found a few things that are useful. I hope that sharing them here will help others, so they will not have to face some rather hard choices. Since I felt this to be a topic of enough importance and…
If something goes wrong with Exchange, your IT resources are in trouble.All Exchange server migration processes are not designed to be identical and though migrating email from on-premises Exchange mailbox to Cloud’s Office 365 is relatively simple…
This video discusses moving either the default database or any database to a new volume.
CodeTwo Sync for iCloud (http://www.codetwo.com/sync-for-icloud?sts=6554) automatically synchronizes your Outlook 2016, 2013, 2010 or 2007 folders with iCloud folders available via iCloud Control Panel. This lets you automatically sync them with…
Suggested Courses

610 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