Microsoft Exchange Server 2016 PowerShell Cookbook - Fourth Edition
by Jonas Andersson, Nuno Mota, Mike Pfeiffer
How it works...
In this example, we used the New-ComplianceSearch cmdlet to run an organization-wide search. The -ExchangeLocation parameter specifies a distribution group, a single mailbox, or all mailboxes to include in the compliance search. Then we use the -ContentMatchQuery parameter to specify our content search filter using the KQL. In this case, we are searching for emails sent or received between January and July 2017 and that have a subject with the phrase project x.
Next, we start the actual search by using the Start-ComplianceSearch cmdlet. Once the search starts, we can track its progress by running Get-ComplianceSearch. When it completes, we can easily check how many items our search criteria matched, and on which mailboxes: ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access