Mike Satterfield
asked on
Exchange 2010 search-mailbox query syntax
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,
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,
ASKER
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.
my problem is that it deletes, any responses, or forwards as well.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
It will help
http://ivan.dretvic.com/2011/05/remove-specific-email-from-all-mailboxes-in-exchange-2010-sp1/
Mahesh