title: Powershell CSV with headers to hashtable
body: <p>I have a csv file with a header row and I want to convert it to a Hashtable.</p>
  
  <p>For example, this is my input:</p>
  
  <pre><code>#Version1.0
  #Fields:ID,Data
  1,data1
  2,data2
  3,data3
  </code></pre>
  
  <p>I want the output to be a hashtable where Key=ID and Value =Data.</p>
  
  <p>This is what I have, but the results aren't quite what I want.</p>
  
  <pre><code>$mytable = Import-Csv -Path $filePath -Header ID,Data
  $HashTable=@{}
  foreach($r in $mytable)
  {
      $HashTable[$r.ID]=$r.Data
  }
  </code></pre>
  
  <p>This creates my table, but when I output it later via 
      $str = $Hashtable | Out-String
      Write-Host $str</p>
  
  <p>I'm getting the following:</p>
  
  <pre><code>Name                  Value
  --------              -----------
  #Fields:ID            Data
  1                     data1
  2                     data2
  3                     data3
  </code></pre>
  
  <p>How do I get rid of the Headers being written to my hashtable? Is there a more elegant solution than sticking if ($r.ID.StartsWith("#")) { continue; }?</p>
  
  <p>Thanks!
  -C</p>