Easy mass local admin password changes

Mass-reset local admin passwords, multiple machines all with different passwords - now with more Easy(TM).
How to use
  1. Open a command prompt with appropriate credentials.
  2. Browse to the directory containing the batch file, list file, and Sysinternals tool files.
  3. Run the batch file.

If there are issues, like the computer name does not exist, you'll see this:

PsPasswd v1.22 - Local and remote password changer
Copyright (C) 2003-2004 Mark Russinovich
Sysinternals - www.sysinternals.com

Error changing password:
The RPC server is unavailable.

See below for sources. Removed the echoing to help with visual security. Removed extra parameters as they are not necessary.

@echo off
set FILE=serverpasslist.txt

for /F "skip=2 tokens=1,2*" %%i in (%FILE%) do (
  pspasswd.exe \\%%i.domain.local administrator %%j

File structure
Spacing is tab-delimited - handy for copying out of Excel.

Target NewPassword
SERVER01 Password1!
SERVER02 Password2@
SERVER03 Password3#

  • http://forum.sysinternals.com/remote-password-change_topic9469.html
  • http://technet.microsoft.com/en-us/sysinternals/bb897543.aspx
  • http://social.technet.microsoft.com/wiki/contents/articles/390.how-to-reset-the-local-administrator-password-on-multiple-computers-remotely.aspx


Popular posts from this blog

DFSR - eventid 4312 - replication just won't work

Fixing duplicate SPNs (service principal name)

Logstash to Nagios - alerting based on Windows Event ID