Formatting Message tracking log
Hello
I am running Exchange 2007 SP2. We frequently need to trace messages that users send, so "get-messagetrackinglog | fl sender, recipients, timestamp, messageid | out-file c:\log.csv" is a life saver.
Only thing is that the format comes out as:
Sender :
Recipients :
MessageId :
TotalBytes :
MessageSubject :
Timestamp :
I would like to come out with the above values in columns, rather than rows....that way I can use Excel to filter by certain values.
Does anyone know if this is possible?
December 20th, 2011 4:18pm
On Tue, 20 Dec 2011 21:09:13 +0000, Wyclef1 wrote:
>
>
>Hello
>
>I am running Exchange 2007 SP2. We frequently need to trace messages that users send, so "get-messagetrackinglog | fl sender, recipients, timestamp, messageid | out-file c:\log.csv" is a life saver.
>
>Only thing is that the format comes out as:
>
>Sender :
>
>Recipients :
>
>MessageId :
>
>TotalBytes :
>
>MessageSubject :
>
>Timestamp :
>
>I would like to come out with the above values in columns, rather than rows....that way I can use Excel to filter by certain values.
>
>Does anyone know if this is possible?
You can pipe the output of get-messagetracking into a "select" and the
pipe that into export-csv.
---
Rich Matheisen
MCSE+I, Exchange MVP
--- Rich Matheisen MCSE+I, Exchange MVP
Free Windows Admin Tool Kit Click here and download it now
December 20th, 2011 5:57pm
Hi,
You can run the following command to achieve your goal:
Get-MessageTrackingLog –sender <senderemailaddress> | select sender, recipients, timestamp, messageid | ft >C:\log1.csv
Hope it helps. If you encounter any difficulties, please let us know.
ThanksSophia Xu
TechNet Community Support
December 21st, 2011 9:49pm
On Thu, 22 Dec 2011 02:40:05 +0000, Sophia Xu wrote:
>
>
>Hi,
>
>
>
>You can run the following command to achieve your goal:
>
>
>
>Get-MessageTrackingLog ?sender <senderemailaddress> | select sender, recipients, timestamp, messageid | ft >C:\log1.csv
>
>
>
>Hope it helps. If you encounter any difficulties, please let us know.
That usually produces truncated data in the output file -- and the
file isn't in CSV format.
---
Rich Matheisen
MCSE+I, Exchange MVP
--- Rich Matheisen MCSE+I, Exchange MVP
Free Windows Admin Tool Kit Click here and download it now
December 21st, 2011 11:35pm
Hi,
You can run the following command to achieve your goal:
Get-MessageTrackingLog –sender <senderemailaddress> | select sender, recipients, timestamp, messageid | ft >C:\log1.csv
Hope it helps. If you encounter any difficulties, please let us know.
ThanksSophia Xu
TechNet Community Support
December 22nd, 2011 5:40am
Hi,
You can try the following to export files as .csv file:
Get-MessageTrackingLog –sender <senderemailaddress> | select sender, recipients, timestamp, messageid | ft | export-csv C:\log2.csv
ThanksSophia Xu
TechNet Community Support
Free Windows Admin Tool Kit Click here and download it now
December 22nd, 2011 8:08pm
On Fri, 23 Dec 2011 01:00:28 +0000, Sophia Xu wrote:
>You can try the following to export files as .csv file:
I don't think so.
>Get-MessageTrackingLog ?sender <senderemailaddress> | select sender, recipients, timestamp, messageid | ft | export-csv C:\log2.csv
Did you examine the output of that???
Try this:
Get-MessageTrackingLog -sender
| select sender,
@{n='recipients';e={[string]::join(";",($_.recipients|foreach{$_}))}},
timestamp, messageid | export-csv C:\temp\log2.csv -notypeinfo
---
Rich Matheisen
MCSE+I, Exchange MVP
--- Rich Matheisen MCSE+I, Exchange MVP
December 22nd, 2011 10:10pm
On Fri, 23 Dec 2011 01:00:28 +0000, Sophia Xu wrote:
>You can try the following to export files as .csv file:
I don't think so.
>Get-MessageTrackingLog ?sender <senderemailaddress> | select sender, recipients, timestamp, messageid | ft | export-csv C:\log2.csv
Did you examine the output of that???
Try this:
Get-MessageTrackingLog -sender
| select sender,
@{n='recipients';e={[string]::join(";",($_.recipients|foreach{$_}))}},
timestamp, messageid | export-csv C:\temp\log2.csv -notypeinfo
---
Rich Matheisen
MCSE+I, Exchange MVP
--- Rich Matheisen MCSE+I, Exchange MVP
Free Windows Admin Tool Kit Click here and download it now
December 23rd, 2011 6:02am