Quantcast
Channel: Exchange Server 2013 - Administration, Monitoring, and Performance 论坛
Viewing all articles
Browse latest Browse all 8719

Searchquery Variable - not working

$
0
0

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


Viewing all articles
Browse latest Browse all 8719

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>