trying to run this cmd from an elevated PS prompt.
Import-CSV "C:\Users\administrator\Documents\Students.csv" | foreach {New-ADUser -SamAccountName $_.PermID -Name ($_.FirstName + " " + $_.LastName) -DisplayName ($_.FirstName + " " + $_.LastName) -Surname $_.LastName -GivenName $_.FirstName -Path $_.OU -AccountPassword (ConvertTo-SecureString -AsPlainText $_.Password -Force) -Enabled $true }
and it fails with
New-ADUser : The server is unwilling to process the request
At line:1 char:81
+ Import-CSV "C:\Users\administrator\Documents\Students.csv" | foreach {New-ADUser <<<< -SamAccountName $_.PermID -Nam
e ($_.LastName + ", " + $_.FirstName) -DisplayName ($_.LastName + ", " + $_.FirstName) -Surname $_.LastName -GivenName
$_.FirstName -Path $_.OU -AccountPassword (ConvertTo-SecureString -AsPlainText $_.Password -Force) -Enabled $true }
+ CategoryInfo : NotSpecified: (CN=Marsh\, Stan...dents,dc=testad:String) [New-ADUser], ADException
+ FullyQualifiedErrorId : The server is unwilling to process the request,Microsoft.ActiveDirectory.Management.Comm
ands.NewADUser
No really sure what it means by the server is unwilling. Could it be the Account/Password Policies?
Thanks for the help