Aren'tyou going to end up with 2 sets of column headings if you do that?

-----Original Message-----
From: Michael B. Smith <mich...@smithcons.com>
Sent: Monday, August 02, 2010 5:13 PM
To: MS-Exchange Admin Issues <exchangelist@lyris.sunbelt-software.com>
Subject: RE: Export a list of all mail to and from a certain user


$receive = gc c:\temp\exportRecPam.csv
$send = gc  c:\temp\exportSendPam.csv

$total = $receive + $send
$total | out-file c:\temp\exportPam.csv

---- or (one liner) -----

$((gc c:\temp\exportRecPam.csv) + (gc  c:\temp\exportSendPam.csv)) | out-file 
c:\temp\exportPam.csv

-----

There are also tricks you can play by using the output of 
Get-MessageTrackingLog and the -PassThru option with Tee and Where-Object. Not 
worth it, IMHO.

And other tricks you can play, treating the contents of a file as if it were a 
variable itself (since the file system provider is "just another provider" just 
like the variable provider). Again, just confusing and not worth it.

What you REALLY want is a -Filter parameter on the Get-MessageTrackingLog 
cmdlet - and that doesn't exist. Faking it out by using a proxy cmdlet 
absolutely KILLS performance.

Regards,

Michael B. Smith
Consultant and Exchange MVP
http://TheEssentialExchange.com


-----Original Message-----
From: Steve Hart [mailto:sh...@wrightbg.com]
Sent: Monday, August 02, 2010 5:54 PM
To: MS-Exchange Admin Issues
Subject: RE: Export a list of all mail to and from a certain user



I should have thunk of that!  Sorry

Here's what I have so far. This works, but creates two files. I'd like to say, 
"Return this record if Pam is the recipient or if Pam is the sender." Then I 
would only have one file.


Get-MessageTrackingLog -Server Corp-Exchange07 -EventID RECEIVE -Start 8-1-2010 
-End 8-31-2010 -Recipients:pcra...@wrightbg.com | select-object 
TimeStamp,MessageSubject,Sender,@{Name="Recipients";Expression={$_.recipients}}|
 Export-Csv C:\Temp\ExportRecPam.csv


Get-MessageTrackingLog -Server Corp-Exchange07 -EventID RECEIVE -Start 8-1-2010 
-End 8-31-2010 -Sender:pcra...@wrightbg.com | select-object 
TimeStamp,MessageSubject,Sender,@{Name="Recipients";Expression={$_.recipients}}|
 Export-Csv C:\Temp\ExportSendPam.csv

Steve Hart

Network Administrator

503.491.4343 -Direct | 503.492.8160 - Fax


-----Original Message-----
From: James Bensley [mailto:jwbens...@gmail.com]
Sent: Monday, August 02, 2010 2:42 PM
To: MS-Exchange Admin Issues
Subject: Re: Export a list of all mail to and from a certain user

Maybe if you post what you have so far someone will be able to help?

--
Regards,
James.

http://www.jamesbensley.co.cc/

There are 10 kinds of people in the world; Those who understand Vigesimal, and 
J others...?






**************************************************************************************************
Note: 
The information contained in this message may be privileged and confidential 
and 
protected from disclosure.  If the reader of this message is not the intended  
recipient, or an employee or agent responsible for delivering this message to  
the intended recipient, you are hereby notified that any dissemination,   
distribution or copying of this communication is strictly prohibited. If you  
have received this communication in error, please notify us immediately by  
replying to the message and deleting it from your computer. 
**************************************************************************************************

**************************************************************************************************
Note: 
The information contained in this message may be privileged and confidential 
and 
protected from disclosure.  If the reader of this message is not the intended  
recipient, or an employee or agent responsible for delivering this message to  
the intended recipient, you are hereby notified that any dissemination,   
distribution or copying of this communication is strictly prohibited. If you  
have received this communication in error, please notify us immediately by  
replying to the message and deleting it from your computer. 
**************************************************************************************************




Reply via email to