Exchange Server 2010 – Export Message Tracking Log Results to CSV File

From inside of the Exchange Management Shell, here are a few examples of how to export the message tracking log results to a csv (comma separated value) file which is easily imported and manipulated in a spreadsheet application such as Microsoft Excel or Open Office Calc:

To display the date, time, recipients, and the message subject on all of the sent items from a mailbox between a given time period:

get-messagetrackinglog -Sender "UsersEmailAddress@yourdomain.com" -EventID "SEND" -Start "7/1/2014 12:00:00 AM" -End "7/9/2014 1:30:00 PM" |select Timestamp, Sender, {$_.Recipients}, MessageSubject | Export-Csv c:\send_results.csv

To display all of the same info but for messages received in a mailbox:

get-messagetrackinglog -Recipients:UsersEmailAddress@yourdomain.com -EventID "RECEIVE" -Start "7/1/2014 12:00:00 AM" -End "7/9/2014 1:30:00 PM" |select Timestamp, Sender, {$_.Recipients}, MessageSubject | Export-Csv c:\receive_results.csv

There are many other useful parameters you can pass with the select statement such as ClientIp, ClientHostname, ServerIp, and TotalBytes or to return all possible column names simply put “select *” in between the pipes.

Leave a Reply