Wednesday, May 26, 2010

Filtering Message Tracking Log

Filtering message tracking log on the basis of sender & recipient can be easily achieved thru powershell:

For example:

you want to find mails where sender or recipents are from specific domain:

Run the below powershell command on the hub server & export the results to comma separated file.

Get-MessageTrackingLog -Server exchange-hub -EventId receive -Start "May 16 2010 12:00AM" -resultsize unlimited | where {
$_.recipients -like * -or $_.sender -like *} | select Timestamp,clientip,ClientHostname,ServerIp,ServerHostname,sender,@{Name="Recipents";Expression={$_.recipients}} | export-csv c:\abc.csv

No comments:

Post a Comment