Solved

Powershell help

Posted on 2016-09-28
3
56 Views
Last Modified: 2016-09-29
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
0
Comment
Question by:crp0499
  • 2
3 Comments
 
LVL 14

Accepted Solution

by:
Todd Nelson earned 250 total points
ID: 41820927
Give this a try...

Get-MessageTrackingLog | select sender,recipients,messagesubject,timestamp,connectorid | export-csv c:\log.csv -notype
1
 
LVL 13

Assisted Solution

by:Michael Machie
Michael Machie earned 250 total points
ID: 41820928
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
0
 
LVL 14

Expert Comment

by:Todd Nelson
ID: 41821961
Out-File doesn't output data in a CSV format (as requested) despite the filename extension given.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will help you understand what HashTables are and how to use them in PowerShell.
This article explains in simple steps how to renew expiring Exchange Server Internal Transport Certificate.
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now