title: Importing csv to SharePoint list with Powershell
body: <p>I want to import data from a CSV to a SharePoint list, all I'm getting from my script is blank rows. Here is my code:</p>
  
  <pre><code># CSV path/File name
  $contents = Import-Csv ".\Input.csv"
  
  # Web URL
  $web = Get-SPWeb -Identity "http://Zaxiyn/" 
  
  # SPList name
  $list = $web.Lists["Technical Profile List"] 
  
  
  # Iterate for each list column
  
  foreach ($row in $csv) {
      $item = $list.Items.Add();
      $item["Computer"] = $row.Computer;
      $item["ItemOrder"] = $row.ItemOrder;
      $item["Category"] = $row.Category;
      $item["ItemName"] = $row.ItemName;
      $item["ItemValue"] = $row.ItemValue;
      $item.Update();
  }
  </code></pre>