PowerShell: Create CSV without Header

get-process | ConvertTo-CSV -NoTypeInformation | select -Skip 1
Advertisements

3 thoughts on “PowerShell: Create CSV without Header

  1. Very nice – and thank you. Is there a way to import a CSV that already has a header but ignore the first line?

    • I don’t know the format of CSV you have
      try this

      $csv = Get-Content ${File Name}
      $csv = $csv[1..($csv.count - 1)]

      or this

      $csv = Get-Content ${File Name}
      $csv = $csv[0], $csv[2..($csv.count - 1)]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s