Windows – Changing other user password from command line

active-directorywindows

I'm in an AD domain and I want to change someone's password (which is expired but I think it is irrelevant).

I'm not a AD admin so net user <username> * /domain does not work.

I can change it pressing CTRL+ALT+DELETE->Change Password typing the old password which I have; is there a command line equivalent of this process?

Best Answer

Actually, if you're not a domain admin (or account admin), it's relevant: for an account with expired password, you must do an interactive logon to change the password.

Otherwise, if you know the other user's password, you may launch a Powershell session with those credentials and use the code that @Ryan Bolger just posted. Or even easier:

Set-ADAccountPassword otheruser -oldpassword typeoldpassword -newpassword typenewpassword

**** EDIT ****

Forget everything above: you can do it with that command, as that command it actually does an interactive logon. So just do:

Set-ADAccountPassword otheruser

and you'll be prompted for old password, then new password, then retype new password. I just tested it! :)