JSI Tip 8306. How do I change the Administrator's password on my member servers?

Using MemberServer.bat and PsExec freeware, I have scripted AdmPwdMbrSvr.bat to change the Administrator's password on my member servers.

The syntax for using AdmPwdMbrSvr.bat is:

AdmPwdMbrSvr NewPassword

Where NewPassword must conform to any local password policies that you have set.

AdmPwdMbrSvr.bat creates a password.log file in the current folder, that contains messages similar to:

<ComputerName> password changed
<ComputerName> password reset failed
<ComputerName> not available

AdmPwdMbrSvr.bat contains:

@echo off
if \{%1\}==\{\} @echo Syntax: AdmPwdMbrSvr NewPassword&goto :EOF
set NewPassword=%1
if exist password.log del /q password.log
call :blind>>nul 2>>&1
goto :EOF
for /f "Tokens=*" %%w in ('memberserver') do set cn=%%w&call :svr
goto :EOF
ping -n 1 %cn%>nul
if %ERRORLEVEL% NEQ 0 goto wsdown
psexec "\\%cn%" -s cmd.exe /c net user Administrator %NewPassword%
if %ERRORLEVEL% NEQ 0 goto wserr
@echo %cn% password changed>>password.log
goto :EOF
@echo %cn% password reset failed>>password.log
goto :EOF
@echo %cn% not available>>password.log

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.