Create CSV without Header

by Aug 8, 2011

ConvertTo-CSV can create comma separated values (CSV) on the fly but it always adds a new header. To create CSV data without columns, take a look at some piece of code – it removes the first two lines:

$filepath = "$env:temp\rawcsv.txt"

$processes = Get-Process | ConvertTo-CSV 
$processes[2..$($processes.Count-1)] | Out-File $filepath
notepad $filepath

Twitter This Tip!
ReTweet this Tip!