To quickly change a password for any local administrator account, albeit locally or remote the following script can be used:
$account = [ADSI]("WinNT://server01/Administrator,user") $account.psbase.invoke("setpassword",'Password1') |
The WinNT provider allows for access to the SAM database on remote systems, assuming the account that executes this has the appropriate permissions to do so.