title: Add multiple users to multiple groups from one import csv
body: <p>I have a csv with 2 columns, one column is AD group names and one is user account names. I am trying to read the csv and import the users into their corresponding group. </p>
  
  <p>Here is what i have to so far. It's saying both arguments(identity,member) are null, which makes no sense since the headers are correctly specified.</p>
  
  <pre><code>import-module activedirectory
  $list = import-csv "C:\Scripts\Import Bulk Users into bulk groups\bulkgroups3.csv"
  
  Foreach($user in $list){       
      add-adgroupmember -identity $_.Group -member $_.Accountname
  }
  </code></pre>
  
  <p>Heres whats in the csv file</p>
  
  <pre><code>Group             Accountname 
  group1            user1 
  group1            user2 
  group1            user3 
  group2            user4 
  group2            user5 
  group3            user6 
  group3            user7 
  group3            user8 
  group4            user9 
  group5            user10 
  </code></pre>
  
  <p><strong>EDIT</strong> Command and error</p>
  
  <p>Here is my script, error i receive and csv.</p>
  
  <pre><code>Import-Csv "C:\Scripts\Import Bulk Users into bulk groups\bulkgroups.csv" | 
  ForEach { get-aduser $_.Accountname | add-adgroupmember $_.Group}
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/xDjLH.jpg" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/ZOo9K.jpg" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/ZRELe.jpg" alt="enter image description here"></p>