Home
%3CLINGO-SUB%20id%3D%22lingo-sub-602970%22%20slang%3D%22en-US%22%3EHow%20to%20Easily%20Export%20Message%20Tracking%20Results%20in%20Exchange%20Server%202007%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-602970%22%20slang%3D%22en-US%22%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3E%3CSTRONG%3E%3CSPAN%20style%3D%22color%3A%20%23ff0000%3B%22%3EEDIT%3A%20We%20updated%20this%20post%20on%2012%2F9%2F2008%20and%20corrected%20the%20step%204%20below%3C%2FSPAN%3E%3C%2FSTRONG%3E.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3EI%20had%20a%20case%20earlier%20this%20month%20where%20the%20customer%20wanted%20a%20simple%20way%20to%20export%20the%20results%20of%20message%20tracking.%26nbsp%3B%20In%20the%20Exchange%20Management%20Console%2C%20he%20used%20the%20Message%20Tracking%20feature%20under%20Toolbox%20to%20configure%20a%20set%20of%20messaging%20tracking%20parameters%20and%20then%20received%20the%20results%2C%20as%20in%20this%20example%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Flegacyfs%2Fonline%2Fmedia%2Fthemes%2Fexchange%2Fimages%2F450209_ExportMsgTrack01.jpg%22%20original-url%3D%22http%3A%2F%2Fblogs.technet.com%2Fthemes%2Fexchange%2Fimages%2F450209_ExportMsgTrack01.jpg%22%20%2F%3E%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3EAlthough%20there%20is%20no%20way%20in%20the%20console%20to%20export%20this%20to%20a%20text%20or%20csv%20file%2C%20you%20can%20follow%20these%20steps%20to%20export%20to%20CSV%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3E1.%20Configure%20message%20tracking%20parameters%20the%20way%20you%20need%20them%20and%20view%20the%20results%20to%20confirm.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3E2.%20Scroll%20to%20the%20bottom%20of%20the%20Message%20Tracking%20Results%20screen%2C%20and%20click%20Go%20Back.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3E3.%20Copy%20the%20get-messagetrackinglog%20command%20syntax%20from%20the%20Exchange%20Management%20Shell%20command%20field%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Flegacyfs%2Fonline%2Fmedia%2Fthemes%2Fexchange%2Fimages%2F450210_ExportMsgTrack02.jpg%22%20original-url%3D%22http%3A%2F%2Fblogs.technet.com%2Fthemes%2Fexchange%2Fimages%2F450210_ExportMsgTrack02.jpg%22%20%2F%3E%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3E4.%20Open%20the%20Exchange%20Management%20Shell%2C%20paste%20in%20the%20copied%20get-messagetrackinglog%20command%2C%20and%20add%20the%20following%20to%20the%20end%20of%20the%20command%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Flegacyfs%2Fonline%2Fmedia%2Fthemes%2Fexchange%2Fimages%2F450242_ExportMsgTrack04.jpg%22%20original-url%3D%22http%3A%2F%2Fblogs.technet.com%2Fthemes%2Fexchange%2Fimages%2F450242_ExportMsgTrack04.jpg%22%20%2F%3E%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3EThis%20will%20create%20a%20CSV%20file%20of%20the%20message%20tracking%20results%20with%20column%20headers%20that%20can%20then%20be%20imported%20into%20Excel%2C%20for%20example.%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20style%3D%22font-size%3A%20x-small%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3E-%20%3C%2FSPAN%3E%3CA%20target%3D%22_blank%22%20href%3D%22http%3A%2F%2Fmsexchangeteam.com%2Farticles%2F450070.aspx%22%20rel%3D%22noopener%20noreferrer%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3EKristi%20Simmons%3C%2FSPAN%3E%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E

EDIT: We updated this post on 12/9/2008 and corrected the step 4 below.

I had a case earlier this month where the customer wanted a simple way to export the results of message tracking.  In the Exchange Management Console, he used the Message Tracking feature under Toolbox to configure a set of messaging tracking parameters and then received the results, as in this example:

Although there is no way in the console to export this to a text or csv file, you can follow these steps to export to CSV:

1. Configure message tracking parameters the way you need them and view the results to confirm.

2. Scroll to the bottom of the Message Tracking Results screen, and click Go Back.

3. Copy the get-messagetrackinglog command syntax from the Exchange Management Shell command field:

4. Open the Exchange Management Shell, paste in the copied get-messagetrackinglog command, and add the following to the end of the command:

This will create a CSV file of the message tracking results with column headers that can then be imported into Excel, for example.

- Kristi Simmons

10 Comments
Not applicable
That’s a good way and the one I use to create statistical reports based on message tracking (exporting the output to an excel file).

Another way (which I haven’t tested yet!) is using Scriptacular from Mihai Jalobeanu and Vivek Sharma (http://www.viveksharma.com/TECHLOG/archive/2006/12/21/announcing-the-exchange-2007-powershell-script...).
Theres is a script, called out-html.ps1, in that pack that exports the results from a command to .html webpage. You can see an example in this article from Anderson Patricio: http://www.msexchange.org/articles_tutorials/exchange-server-2007/tools/using-exchange-server-2007-b...

But I think the first method is the best one.
Not applicable
Hi,

this no really good idea, since the Receipients are passed in a System.String[] which isn't expanded. This means: you can't get the Receipients out of your csv. I'm astonished that you're posting such an incomplete Tip.
A workaround for this should be a additional "select": get-messagetracking ... | selectTimestamp, {$_.recipients}, MessageSubject,... | export-csv... (not fully tested).

Bye Filipp
Not applicable
PowerShell with Exchange cmdlets makes my life easier every single day !
Not applicable
Thanks for pointing out the issue with the Recipients column.  The article has been corrected.
Not applicable
Am I dreaming? What a command line. Why is there no "export to csv" button in the normal message tracking shell?
Not applicable
another nice feature is to use the convertto-HTML option, this way use can easily create your own reporting... and it's nice to play around with

get-messagetrackinglog -Sender:<<somebody>> -EventID "RECEIVE" -Start "12/1/2008 2:04:00 PM" -End "12/30/2008 2:14:00 PM" | convertto-HTML TimeStamp,ServerHostName,Sender,{$_.recipients},MessageSubject| out-file M_Tracks.html

Pipe it with
Get-Exchangeserver | where-object {$_.IsHubTransportServer -eq "True"}
and you track from all HT servers in your organization

Not applicable
I would like to try this, but I need to run it on multiple servers.  Is this possible with one line?  example get-messagetrackinglog -Recipients:jon.doe@test.com  -Server "testhub01,tesrhub02" -Start "1/21/2009 6:42:00 AM" -End "1/21/2009 10:52:00 AM"

I can't get the multiple hubs part to work in the command and haven't seen any examples.  Thanks for any input.
Not applicable
You can use this to retrieve all HT servers from your organization:

Get-ExchangeServer | where {$_.IsHubTransportServer -eq "true"}

Pipe this output (you can sort this output) to the get-messagetrackinglog and you get this:

Get-ExchangeServer | where {$_.IsHubTransportServer -eq "true"} | sort-object Name | get-messagetrackinglog -Sender:<<somebody>> -EventID "RECEIVE" -Start "12/1/2008 2:04:00 PM" -End "12/30/2008 2:14:00 PM" | convertto-HTML TimeStamp,ServerHostName,Sender,{$_.recipients},MessageSubject| out-file M_Tracks.html
Not applicable
Thanks Jaap, that was very helpful and educational.  noober
Not applicable
What if I were to want to filter the messagetrackinglog to only look at, say, distribution groups, and I only wanted to show a message count?  I've gotten good results on a single recipient with | measure-object, but I'd like to get a message count for each DL.