Exchange Mgmt Shell get-messagetrackinglog: Need it to output more fields.

I need more output from get-messagetrackinglog.  If I use the Message Tracking Assistant in the Exchange Management Console to get output, it has several columns like IP address, recipient, timestamp, etc.  But if I run the command in the shell, I only get like 3 rows of info.  How can I specify which columns I want or get all of them?
dbestcomputersAsked:
Who is Participating?
 
achaldaveCommented:
Get-MessageTrackinglog -eventid [ send/receive/store..] -sender user@domain.com -start ["start date/time"] -end ["end date/time"] | select-object sender,{$_.recipients},clientip,serverip,subject...] | export-csv messagelog.csv

http://technet.microsoft.com/en-us/library/aa997573.aspx
http://technet.microsoft.com/en-us/library/bb124375.aspx
http://www.stevieg.org/tag/get-messagetrackinglog/
0
 
netballiCommented:
Try the following

Get-MessageTrackingLog -EventID "DELIVER" -Start "01/01/2012 12:00:00 AM" -End "01/22/2012 2:00:00 PM" -ResultSize unlimited | where {[string]$_.sender -match "abc.com"} | select timestamp, eventid, source, messagesubject, sender, {$_.recipients}, totalbytes
0
 
tigermattCommented:
If you "pipe" the command (i.e. the | key on your keyboard - Shift + (left of Z) on my British layout) to the "format-list" command, you see a list of all the attributes for each record.

e.g. get-messagetrackinglog | format-list

An equivalent for format-list, known as an alias, is "FL".

Identify the fields you want to extract, then, as netballi points out above, use the select command in a pipe to select just those fields. You can pipe the resulting output to format-table, or FT, to display the results in a tabulated form.

e.g. get-messagetrackinglog | select <parameter list separated by commas> | format-table

Alternatively, you can pass the parameter list to format-table directly:

get-messagetrackinglog | format-table <parameter list>

Any filters you need to perform can still be made on Get-MessageTrackingLog before the pipe "|" symbol, such as start or end dates to search for, or the usual -resultsize unlimited argument to ensure you are not restricted to a particular number of rows.

-Matt
0
 
dbestcomputersAuthor Commented:
achaldave gave me what I needed first.

tigermatt explained it really well to me.

Thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.