I am trying to setup a Search-Mailbox command to look between certain times:
Search-Mailbox $Check_user -SearchQuery "(subject:`"$MessageSubject`")AND(from:`"$SenderEmail`")AND(Received:`"$Start_date..$End_date`")"
$Start_date = "03/27/2019 09:40:00"
$End_date = "03/27/2019 09:50:00"
The date part works fine, but it seems to be ignoring the time part. If the message was delivered at 09:16 giving the above times it will find the message, same as if I put 09:10 and 09:20.
Looking at the documentation using the YYYY-MM-DDThh:mm:ssZ format (https://docs.microsoft.com/en-us/sharepoint/dev/general-development/keyword-query-language-kql-syntax-reference) it still seems to ignore the time wither specified in Central time zone or UTC time zone.