?
Solved

Exchange 2010 search-mailbox query syntax

Posted on 2013-11-27
3
Medium Priority
?
24,406 Views
Last Modified: 2013-11-28
I am trying to use the following EMC command:

Search-Mailbox -Identity "<user>" -SearchQuery 'Subject:"Example subject"' -DeleteContent

And it works, the problem is, almost too well. So it will go into a mailbox and delete any email with the subject:

Example Subject

but it will also delete any with the subject

RE: Example Subject
FW: Example subject

etc..

my question is how do I do this, and have the exact string, so it won't delete variations of it ?

Thanks,
0
Comment
Question by:sattermc
[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
3 Comments
 
LVL 37

Expert Comment

by:Mahesh
ID: 39681483
0
 

Author Comment

by:sattermc
ID: 39681546
That is basically running the same command that I am. Mine does work. I just want to delete the original email only. not any "RE:" or "FW:"

my problem is that it deletes, any responses, or forwards as well.
0
 
LVL 40

Accepted Solution

by:
Subsun earned 2000 total points
ID: 39682029
Exchange 2010 Search Mailbox query doesn’t support the “FW” & “RE” in Subject Query. You need to add multiple conditions to narrow down the search and delete the emails.. For instance add subject and send time and from address..
Search-Mailbox -Identity "USER" -SearchQuery 'subject:"Example Subject" AND Received:< 01/01/2010 AND from:subsun@ee.com' -DeleteContent -force

Open in new window

For syntax refer..
http://help.outlook.com/en-US/140/ms.exch.ecp.newmailboxsearch_searchquery.aspx
0

Featured Post

Looking for the Wi-Fi vendor that's right for you?

We know how difficult it can be to evaluate Wi-Fi vendors, so we created this helpful Wi-Fi Buyer's Guide to help you find the Wi-Fi vendor that's right for your business! Download the guide and get started on our checklist today!

Question has a verified solution.

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

This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
Unified and professional email signatures help maintain a consistent company brand image to the outside world. This article shows how to create an email signature in Exchange Server 2010 using a transport rule and how to overcome native limitations …
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…
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…

719 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