title: Import users to local with powershell windows server 2008 r2
body: <p>I got this script:</p>
  
  <pre><code>$Users = Import-Csv C:\Users\Administrator\Desktop\userImport\userTest.csv
  $Users | % { 
  
  # Setting data
  $computer = [ADSI]"WinNT://."
  $userGroup = [ADSI]"WinNT://./Users,Group"
  
  # Create user itself
  $createUser = $computer.Create("User",$_.userid)
  
  # Set password (print1!)
  $createUser.SetPassword($_.password)
  $createUser.SetInfo()
  
  # Create extra data
  $createUser.Description = "Import via powershell"
  $createUser.FullName = $_.'full name'
  $createUser.SetInfo()
  
  # Set standard flags (Password expire / Password change / Account disabled)
  $createUser.UserFlags = 64 + 65536 # ADS_UF_PASSWD_CANT_CHANGE + ADS_UF_DONT_EXPIRE_PASSWD
  $createUser.SetInfo()
  
  # Adduser to standard user group ("SERVER02\Users")
  $userGroup.Add($createUser.Path)
  }
  </code></pre>
  
  <p>But I get the error:
  A member could not be added to or removed from the local group because the member does not exist. How Can I possible fix it??</p>