Question: I'm trying to use powershell cmdlet export-csv to output a csv file - but without the header information from a sql server recordset i.e first row I'm trying to implement this powershell code snippet. $outputfile="\\myoutputfile.csv" $dt = new-object "System.Data.DataTable" --add some data into the data table dt | select * -ExcludeProperty RowError, RowState, HasErrors, Name, Table, ItemArray | export-csv -path $outputfile -NoTypeInformation Answer: It is possible to get the no header on an export-csv - but it does require a few workarounds - which seem excessive for what you're attempting to achieve I prefer to use the powershell cmdlet...
Read more →