I had a need to change remote computer’s local administrator account’s password without disturbing the computer’s user. I came up with simple single line command which uses PsPasswd command. PsPasswd is a utility made by Mark Russinovich which allows changing the password on a remote computer.
Here’s the usage of PsPasswd command:
usage: pspasswd [[\\computer[,computer[,..] | @file [-u user [-p psswd]]] Username [NewPassword]
pspasswd \\remote_computers_name -u account_with_admin_rights -p password_for_admin_rights_account local_account new_password
The -u and -p parameters defines the user account and password which are used in executing the command.
PsPasswd also supports running password change on multiple computers:
pspasswd \\computer1,computer2,computer3,… username password
You can even make a list of computers into text file and execute: pspasswd @filename username password
PsPasswd is a part of Sysinternal’s command-line toolkit called PsTools. I really recommend that you check it out if you already aren’t familiar with it.