title: Powershell import-csv with empty headers
body: <p>I'm using PowerShell To import a TAB separated file with headers. The generated file has a few empty strings "" on the end of first line of headers. PowerShell fails with an error:</p>
  
  <blockquote>
    <p>"Cannot process argument because the
    value of argument "name" is invalid.
    Change the value of the "name"
    argument and run the operation again"</p>
  </blockquote>
  
  <p>because the header's require a name.</p>
  
  <p>I'm wondering if anyone has any ideas on how to manipulate the file to either remove the double quotes or enumerate them with a "1" "2" "3" ... "10" etc.</p>
  
  <p>Ideally I would like to not modify my original file. I was thinking something like this</p>
  
  <pre><code>$fileContents = Get-Content -Path = $tsvFileName
  $firstLine = $fileContents[0].ToString().Replace('`t""',"")
  $fileContents[0] = $firstLine
  Import-Csv $fileContents -Delimiter "`t"
  </code></pre>
  
  <p>But Import-Csv is expecting $fileContents to be a path. Can I get it to use Content as a source?</p>