title: CSV input, powershell pulling $null value rows from targeted column
body: <p>I am trying to create a script to create Teams in Microsoft Teams from data in a CSV file. </p>
  
  <p>The CSV file has the following columns: <code>Team_name, Team_owner, Team_Description, Team_class</code></p>
  
  <p>The script should grab <code>Team_name</code> row value and use that value to create a variable. Use that variable to query if it exists in Teams and if not, create it using the data in the other columns. </p>
  
  <p>The problem I am having is my <code>foreach</code> loop seems to be collecting rows without values. I simplified the testing by first trying to identify the values and monitoring the output.</p>
  
  <p>Here is the test script</p>
  
  <pre><code>$Team_infocsv = Import-csv -path $path Teams_info.csv
  
  # $Team_infocsv | Foreach-object{
  
  foreach($line in $Team_infocsv){
      $owner = $line.Team_owner
      Write-Host "Team Owner: $owner"
      $teamname = $line.Team_name
      Write-Host "Team Name: $teamname"
      $team_descr = $line.Team_Description
      Write-Host "Team Description: $team_descr"
      $teamclass = $line.Team_class
      Write-Host "Team Class: $teamclass"
  }
  </code></pre>
  
  <p>I only have two rows of data but yet returned are the two lines as requested with extra output (from rows) without values.</p>