Set-ADAccountPassword - The operation failed because of a bad parameter

148 Views Asked by At

I am writing a script to reset a ADusers password, through PowerShell

Set-ADAccountPassword -Identity TestA -Reset -NewPassword (ConvertTo-SecureString -AsPlainText $password -Force)

when I run the above script I get the below enter image description here

Any ideas on what could be causing this

I have tried changing the password, to see if it was the criteria that was affecting it. all is fine on that front.

I have checked the users -Identity and used other options and still no change

0

There are 0 best solutions below