Exchange 2010 Search-Mailbox SearchQuery with ### on the subject

exchange-2010search

I'm trying to search for messages that include "###" on the subject. I'm checking the AQS documentation but can't see how to escape characters. I've tried quoting, double quoting, but nothing seems to work.

Best Answer

This is a little late but I've run into the same issues and found this to be helpful and pertain to the issues. https://superuser.com/questions/168638/trouble-trying-to-use-windows-search-to-search-for-file-with-a-question-mark-in.

In summary to the link above. The search seems to ignore the special characters and searches based on words only.

I've tested by sending two separate emails with the subjects, "Having ### in subject" and "Having in subject"

The query I constructed looks like -SearchQuery "Subject:`"Having ### in subject`""

The search using this query yielded 2 results finding both subjects which did ignore the '###' all together. This also seems to hold true even when symbols are part of the word such as queries like "Having### in subject" and "Having###in subject".

If you are single using single quotes in the subject then you would escape the query like: -SearchQuery "Subject:'Having ### in subject'" but this too ignores the symbols and will return results for both subjects "Having ### in subject" and "Having in subject".

Related Topic