Forum Discussion
Anonymous
5 years agoNot applicable
PowerShell Export-Csv not as expected
hello, i am trying to export results as a table to a csv Get-PowerBIWorkspace | Format-table | Export-Csv C:\Users\spaldg\Downloads\wksp.csv -NoTypeInformation when displayed on screen (wit...
- 5 years ago
Generally you don't want to use Export-Csv - Write-Output gives you better control over the result, especially for true CSV files.
But if you're sticking with Export-Csv, read this article
Why Can’t I Pipe Format-Table to Export-Csv (and get something useful)? | PowerShell (microsoft.com).
lbendlin
5 years agoSuper User
Generally you don't want to use Export-Csv - Write-Output gives you better control over the result, especially for true CSV files.
But if you're sticking with Export-Csv, read this article
Why Can’t I Pipe Format-Table to Export-Csv (and get something useful)? | PowerShell (microsoft.com).