This works, returns one result as it should:
Search-Mailbox jdoe -SearchQuery {Subject:football AND From:msmith AND Sent:11/04/2014} -EstimateResult
Only
This does not work, returns nothing:
$subject = 'football'
$from = 'msmith'
$sent = '11/04/2014
Search-Mailbox jdoe -SearchQuery {Subject:$subject AND From:$from AND Sent:$sent} -EstimateResult
Only
How can I use variables inside a KQL query? I've tried every combination of " or ' or both around the variables as well but cannot get the query to return anything when I use variables in the KQL statement.
Rich