Powershell help

crp0499
crp0499 used Ask the Experts™
on
Get-MessageTrackingLog | fl sender,recipients,messagesubject,timestamp,connectorid

I need that powershell piped out to a cvs file.  Can someone assist me in adding the missing syntax please?

Thank you

Cliff
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Systems Engineer
Top Expert 2016
Commented:
Give this a try...

Get-MessageTrackingLog | select sender,recipients,messagesubject,timestamp,connectorid | export-csv c:\log.csv -notype
Commented:
out-file [path][filename].[extension]

EX:
Get-MessageTrackingLog | fl sender,recipients,messagesubject,timestamp,connectorid | Out-file c:\reports\date.csv

See link for much more info
http://ss64.com/ps/out-file.html
Todd NelsonSystems Engineer
Top Expert 2016

Commented:
Out-File doesn't output data in a CSV format (as requested) despite the filename extension given.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial