Piping Objects From Format-Table to Export-CSV Has Unexpected Results
Posted
by
makerofthings7
on Server Fault
See other posts from Server Fault
or by makerofthings7
Published on 2012-09-19T19:08:15Z
Indexed on
2012/09/19
21:39 UTC
Read the original article
Hit count: 235
I'm running this command to get a list of all Activesync users and export them to C:\activesync.csv
Get-ActiveSyncDevice | Get-ActiveSyncDeviceStatistics | sort-object status, devicetype , lastsyncattempttime | ft FirstSyncTime ,LastPolicyUpdateTime ,LastSyncAttemptTime ,LastSuccessSync , DeviceType , DeviceID, DeviceAccessState, Identity -a | Export-Csv c:\activesync.csv
The problem is that the CSV data doesn't match the console display if I omit the trailing | c:\activesync.csv
... where the data and columns displayed don't match.
Is this a bug in powershell?
© Server Fault or respective owner