Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0
Actually, you have to skip 2 in the second file since he didn't specify -No= TypeInfo to Export-CSV. But now it starts to look ugly. :-) $receive =3D gc c:\temp\exportRecPam.csv $send =3D gc c:\temp\exportSendPam.csv | select -skip 2 $total =3D $receive + $send $total | out-file c:\temp\exportPam.csv ---- or (one liner) ----- $((gc c:\temp\exportRecPam.csv) + (gc c:\temp\exportSendPam.csv | select -= skip 2)) | out-file c:\temp\exportPam.csv Regards, Michael B. Smith Consultant and Exchange MVP http://TheEssentialExchange.com -----Original Message----- From: Michael B. Smith=20 Sent: Monday, August 02, 2010 6:21 PM To: MS-Exchange Admin Issues Subject: RE: Export a list of all mail to and from a certain user Yes. Regards, Michael B. Smith Consultant and Exchange MVP http://TheEssentialExchange.com -----Original Message----- From: Campbell, Rob [mailto:rob_campb...@centraltechnology.net]=20 Sent: Monday, August 02, 2010 6:19 PM To: MS-Exchange Admin Issues Subject: RE: Export a list of all mail to and from a certain user 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 =3D gc c:\temp\exportRecPam.csv $send =3D gc c:\temp\exportSendPam.csv $total =3D $receive + $send $total | out-file c:\temp\exportPam.csv ---- or (one liner) ----- $((gc c:\temp\exportRecPam.csv) + (gc c:\temp\exportSendPam.csv)) | out-fi= le c:\temp\exportPam.csv ----- There are also tricks you can play by using the output of Get-MessageTracki= ngLog and the -PassThru option with Tee and Where-Object. Not worth it, IMH= O. And other tricks you can play, treating the contents of a file as if it wer= e a variable itself (since the file system provider is "just another provid= er" just like the variable provider). Again, just confusing and not worth i= t. What you REALLY want is a -Filter parameter on the Get-MessageTrackingLog c= mdlet - and that doesn't exist. Faking it out by using a proxy cmdlet absol= utely 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 s= ay, "Return this record if Pam is the recipient or if Pam is the sender." T= hen 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 TimeSt= amp,MessageSubject,Sender,@{Name=3D"Recipients";Expression=3D{$_.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=3D"Recipients";Expression=3D{$_.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:=20 The information contained in this message may be privileged and confidentia= l 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 =20 the intended recipient, you are hereby notified that any dissemination, =20 distribution or copying of this communication is strictly prohibited. If yo= u have received this communication in error, please notify us immediately b= y replying to the message and deleting it from your computer.=20 ***************************************************************************= *********************** ***************************************************************************= *********************** Note:=20 The information contained in this message may be privileged and confidentia= l 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 =20 the intended recipient, you are hereby notified that any dissemination, =20 distribution or copying of this communication is strictly prohibited. If yo= u have received this communication in error, please notify us immediately b= y replying to the message and deleting it from your computer.=20 ***************************************************************************= ***********************