title: Users created with PowerShell New-ADUser can't log in
body: <p>I have a small problem with the New-ADUser command in powershell.
  I'm trying to create a bunch of users from a file, and I can't seem to do it right.</p>
  
  <p>I do create the accounts, but when I try to log into them, it tells me that the "connection method used isn't authorized" (I am sorry if the message isn't exact, the system I'm using isn't in english)</p>
  
  <p>I am using a straight out of the box AD installed on a Windows Server 2012 R2. Everything was left as default for the moment.</p>
  
  <p>The command I'm using is :</p>
  
  <pre><code>for ($i = $BeginLoopAt; $i -le $EndLoopAt; $i++) {
  
      $Id = $WorkSheet.cells.Item($i, 1).text
      $FirstName = $WorkSheet.cells.Item($i, 2).text
      $LastName = $WorkSheet.cells.Item($i, 3).text
      $Country = $WorkSheet.cells.Item($i, 4).text
      $Location = $WorkSheet.cells.Item($i, 5).text
      $Department = $WorkSheet.cells.Item($i, 6).text
      $AccountName = ($FirstName.Substring(0, 1) + $LastName).ToLower()
  
      New-ADUser -Name "$AccountName" -EmployeeID $Id -Country $County -City $Location -Department $Department -GivenName $FirstName -Surname $LastName -Path "$UserPath" -ChangePasswordAtLogon $true -Enabled $true -accountPassword (ConvertTo-SecureString -AsPlainText "Azerty01" -Force) -passThru
  </code></pre>
  
  <p>Seeing the error, I believed that the error was coming from the fact that I didn't add a -AuthType, but after trying with both options from -AuthType, error wouldn't go away.
  It event prints the following error if I choose -AuthType Basic</p>
  
  <pre><code>New-ADUser : The username is not provided. Specify username in ClientCredentials.
  At C:\Users\Administrateur\Desktop\script.ps1:132 char:5
  +                 New-ADUser -Name "$AccountName" -EmployeeID $Id -Country $County -City $Loca ...
  +    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  + CategoryInfo          : NotSpecified: (:) [New-ADUser], ADException
  + FullyQualifiedErrorId : ActiveDirectoryServer:0,Microsoft.ActiveDirectory.Management.Commands.NewADUser
  </code></pre>
  
  <p>Well, Basic AuthType seems to be for SSL login, which isn't what *I want</p>
  
  <p>There is close to no difference between properties of users created with Powershell and users created through GUI. (None that I have seen)
  But the users created through GUI can log in, while those created by powershell can't.</p>
  
  <p>What did I miss?
  Thanks in advance!</p>
  
  <p><strong>EDIT :</strong></p>
  
  <p>After some tests, i realized that, as a matter of fact, i couldn't log in with ANY account created after the AD was installed... Kinda failed before, I thought i created a user named User3 because other names were taken, and I tested with User2 that was there before AD installation...</p>
  
  <p>Meaning, I can only log in accounts that existed before AD DS was installed, and I absolutely don't know why.</p>