Solved

Search-Mailbox Results, how to filter out "RE:"'s and "FW:"'s

Posted on 2014-09-11
2
612 Views
Last Modified: 2014-09-12
I am running the fallowing command:

Get-Mailbox -Server Dalmbx01 | Search-Mailbox -SearchQuery 'Subject: "James Stole my LUNCH!"' -targetmailbox "ABC" -TargetFolder "test03"  -loglevel full

however it returns results that include "FW: James Stole my LUNCH!" and "RE: James Stole my LUNCH!"

We JUST want to find and destroy the original: Messages "James Stole my LUNCH!" and not the FW: or RE:  or anything else that might be like "James Stole my LUNCH - LOLz check it"

Simply adding a NOT '"RE:"' seems to kill off all results.
0
Comment
Question by:BBDallas
2 Comments
 
LVL 40

Accepted Solution

by:
Subsun earned 500 total points
ID: 40318547
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
 

Author Closing Comment

by:BBDallas
ID: 40319506
Thank you.
0

Featured Post

Industry Leaders: 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

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…
Previously, on our Nano Server Deployment series, we've created a new nano server image and deployed it on a physical server in part 2. Now we will go through configuration.
In this video we show how to create a Contact 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 Recipients >> Contact ta…
In this video we show how to create a mailbox database 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 >> Data…

730 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