header image

Quotes in CSVs

Posted by: | June 26, 2019 Comments Off on Quotes in CSVs |

Up to and including PowerShell v6.2.x converting or exporting data to a csv has automatically put quotes round each field. In PowerShell v7 you can control quotes in CSVs


Get-Service | ConvertTo-Csv

as an example.


The current behaviour is to put quotes round everything

“XboxNetApiSvc”,”System.ServiceProcess.ServiceController[]”,”False”,”False”,”False”,”Xbox Live Networking Service”,”Syst


This is still the default behaviour in PowerShell v7 but there’s now a –usequotes parameter to control the quotes. Its default value is always to match previous behaviour.


Other options are AsNeeded and Never

AsNeeded consistently threw an error but Never seems to work

under: PowerShell 7

Comments are closed.