title: Get sAMAccountNames from CSV of Employee IDs powershell
body: <p>Im not sure why I cannot get this to work, but I have a .csv of employee ID's and I want to add them to an AD group, but I cannot get this to work</p>
  
  <pre><code>Function Sync-ADGroup {
  $userIDs = Import-CSV $CSV
  foreach($ID in $IDs){
      Get-ADUser -Filter "EmployeeID -eq '$ID'" -Properties SAMAccountName
      }
  }
  </code></pre>
  
  <p>Then I would add them to the group, but I cannot it to return the ADUserObject.  Not sure what I am missing.</p>