Problem scenario
You run a PowerShell script that has a command setinfo. For example, the script is like this:
#…
$userName = ‘jdoe’
$compName = $env:COMPUTERNAME
$cona = [ADSI]”WinNT://$compName”
$user = $cona.Create(‘User’,$userName)
$user.SetInfo()
You get “Exception calling “SetInfo” with “0” argument(s): “The password does not meet the password policy requirements. Check the minimum password length, password complexity and password history requirements.”
You may go to Administrative Tools ->
…
Continue reading “PowerShell Can Throw a SetInfo With 0 Argument(s) Error When Creating a User”