Hi Team,
I am trying to create a csv file from an empty text file.The csv file should get created with only headers as no data present in text file but my code is creating a complete blank csv file without header.Anything missing in below code ?
import-csv -Path "C:\Powershell-Work\EmtyTest.txt" -Header Date,Time,'R Site',Status,Comments |
Select-Object 'Process Date',Date,Time,'R Site',Status,Comments|
Export-csv -path "C:\Powershell-Work\EmtyTest.csv" -NoTypeInformation