Solved

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

Posted on 2014-09-11
2
574 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

We are happy to announce a brand new addition to our line of acclaimed email signature management products – CodeTwo Email Signatures for Office 365.
Follow this checklist to learn more about the 15 things you should never include in an email signature from personal quotes, animated gifs and out-of-date marketing content.
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…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

948 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now