Symptoms

When running an admin search request that includes a possible date within the query string, you get unexpected results if the date string is in a UK format (day/month/year). This doesn’t include the date property of the search query.

Examples:

Search-Mailbox -Identity User1 -TargetFolder SearchResults -TargetMailbox SearchUser -SearchQuery ‘attachment:”SEG 12 12 2019.txt”’

Search-Mailbox -Identity User1 -TargetFolder SearchResults -TargetMailbox SearchUser -SearchQuery ‘subject:”Born 12 12 2019 USA”’

Cause

This is a known issue in the word breaker.

Workarounds

Method 1:

Don’t use dates in the SearchQuery string.

Note You can still use dates for searchable date properties. 

Method 2:

Break up the date with a wildcard.

Here are two examples showing how to use the wildcard:

Search-Mailbox -Identity User1 -TargetFolder SearchResults -TargetMailbox SearchUser -SearchQuery ‘subject:”Born 12 12 * 2019 USA”’

Search-Mailbox -Identity User1 -TargetFolder SearchResults -TargetMailbox SearchUser -SearchQuery ‘attachment:”SEG 12 12 * 2019 txt”’

Need more help?

Expand your skills
Explore Training
Get new features first
Join Microsoft Insiders

Was this information helpful?

What affected your experience?

Thank you for your feedback!

×