I have a CSV file which looks all fine until it is imported into PowerShell, when its imported each character is followed by a space like C : \ instead of C:\.
It would be easy enough to format the cells to text in Excel (which works) but this CSV file is created on multiple servers by in an automation policy so going through each of these files and formatting them will take a while as you can imagine.
I was wondering if there was a way in which I can format the cells first in PowerShell then import the CSV.
PowerShell code I am using:
$data = import-csv -Path $path -UseCulture -Header @("Path", "Folder", "Size")
CSV Snippet:
C:\,C:\,14.0GB
C:\Program Files,Program Files,4.5GB
C:\Program Files\Microsoft Office,Microsoft Office,2.8GB