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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Exchange

From novice to tech pro — start learning today.