Search mailbox - Specific date range and specific email address

Hello,

I am trying to search all mailboxes in a specific date range for all mails to and from a specific emailaddress.

I have tried the several variations of the search-mailbox command, but here is the latest.

Get-Mailbox | Search-Mailbox -TargetMailbox Administrator -TargetFolder Discovery -LogLevel Full -IncludeUnsearchableItems -SearchQuery 'Sent:{01/01/2014..01/02/2014} AND To:mail@domain.com'

"The KQL Parser threw an exception".

Could someone please tell me the correct way to use the Search-Mailbox cmdlet to accomplish what I'm trying to do?


  • Edited by SveinS Tuesday, September 08, 2015 12:10 PM
September 8th, 2015 12:09pm

Loose the curly brackets. This will work:

Search-Mailbox -EstimateResultOnly -SearchQuery 'Sent:01/01/2014..01/02/2014 AND To:mail@domain.com'

  • Marked as answer by SveinS Wednesday, September 09, 2015 6:57 AM
Free Windows Admin Tool Kit Click here and download it now
September 8th, 2015 7:31pm

Loose the curly brackets. This will work:

Search-Mailbox -EstimateResultOnly -SearchQuery 'Sent:01/01/2014..01/02/2014 AND To:mail@domain.com'

This did the trick. Thank you very much.

  • Edited by SveinS 20 hours 40 minutes ago
September 9th, 2015 6:58am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics