Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Admin search with date string yields unexpected results or no result


View products that this article applies to.

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”’

↑ Back to the top


Cause

This is a known issue in the word breaker.

↑ Back to the top


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”’

↑ Back to the top


Keywords: admin search

↑ Back to the top

Article Info
Article ID : 4569834
Revision : 4
Created on : 7/6/2020
Published on : 7/6/2020
Exists online : False
Views : 195