27 April 2013

Perform wildcard search on Exchange Message Tracking logs

Need to do a wildcard search on Exchange's tracking logs? Microsoft couldn't be bothered including such a basic ability in the console. Instead you're forced to use the Exchange Management Shell. Sigh.

Edit this command as you need:

Get-MessageTrackingLog -ResultSize Unlimited -Start "1/5/2013" -End "1/6/2013" | where{$_.recipients -like "*@example.com"} | select-object Timestamp,SourceContext,Source,EventId,MessageSubject,Sender,{$_.Recipients} | export-csv C:\ExchangeLogResults.txt

Props, Toaster Gremlin.

No comments:

Post a Comment