troubleshooting Question

Export-Csv - why is PowerShell adding delimiter "" - how to avoid this

Avatar of Fr. Vandecan
Fr. VandecanFlag for Belgium asked on
Powershell
3 Comments1 Solution89 ViewsLast Modified:
Export-Csv - why is PowerShell adding delimiter ""

Export-Csv -Path $CSVFile -Encoding UTF8 –delimiter ";" -NoTypeInformation


I have a csv file with this content (before Export)

ExportedOn;Process;DateValue;LogonName;FirstName;LastName;Function;SiteCode;Departement;AppGap;AppSmile;Intranet;Desktop;LapTop;GSM;SmartPhone;VPNAccess;ResetADRights;SDTicket;RFPD
24/07/2018 05:36;Create;02/11/2019 00:00;flastnamei;firstname;lastname;Stagiaire;SI;Job Coaching Bruxelles;FALSE;FALSE;TRUE;FALSE;TRUE;FALSE;FALSE;TRUE;;;


when i use the command

Export-Csv -Path $CSVFile -Encoding UTF8 –delimiter ";" -NoTypeInformation
the file is changed like this

"ExportedOn";"Process";"DateValue";"LogonName";"FirstName";"LastName";"Function";"SiteCode";"Departement";"AppGap";"AppSmile";"Intranet";"Desktop";"LapTop";"GSM";"SmartPhone";"VPNAccess";"ResetADRights";"SDTicket";"RFPD"
"24/07/2018 05:36";"Create";"02/11/2019 00:00";"flastname";"firstname";"lastname";"Stagiaire";"SI";"Job Coaching Bruxelles";"FALSE";"FALSE";"TRUE";"FALSE";"TRUE";"FALSE";"FALSE";"TRUE";;"";""

"" are added which is really annoying….

why ???
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros