Solved

Powershell help

Posted on 2016-09-28
3
62 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

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.
Find out what you should include to make the best professional email signature for your organization.
In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …
This video discusses moving either the default database or any database to a new volume.

772 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