title: how can I bulk add users to Security group with Powershell
body: <p>I am trying to add a list of users to an AD Security group using the below Powershell script and I am getting the following error. Add-ADGroupMember : Cannot find an object with identity:</p>
  
  <p>Can anoybody advise on what I am doing wrong. The user names do exist in AD </p>
  
  <pre><code>Import-Module ActiveDirectory 
  $comps=Get-Content names.txt 
  
  foreach ($comp in $comps)
  {$dns=get-aduser $comp
  $b=$dns.distinguishedname
  Add-ADGroupMember -Identity  $b GIT_GS_AMU_Windows7_Object 
  }
  </code></pre>