powershell: reset user password

UPDATE: screwed up the last one. corrected. :o)

 

things to remember when resetting account passwords.

prompted (displays old, new password dialog)

Set-ADAccountPassword userid

unprompted (yeah, i don’t know why i’d choose this one, honestly.)

Set-ADAccountPassword userid -OldPassword (ConvertTo-SecureString -AsPlainText “myoldpassword” -force) -NewPassword (ConvertTo-SecureString -AsPlainText “mynewpassword” -force)

administrative reset (don’t know the old one, setting it for someone else)

Set-ADAccountPassword userid -Reset -NewPassword (ConvertTo-SecureString -AsPlainText “mynewpassword” -force)

Comments