Here's the script that I use to change admin passwords.
It requires the file cusrmgr.exe from the Windows 2000 Resource Kit.
It is a great tool to have for scripting.
You can change global and local groups, etc also!
code:
BREAK ON
;DEBUG ON
;========================
;= Variables To Edit =
;========================
;Username Note: This should be the local admin account of the remote PC's.
$USERNAME = "administrator"
;Password Note: This should be the local admin password of the remote PC's.
;Special Note: @, %, $ are special characters.
If your password contains them please type them twice in a row.
;EX: "$Test@_$" = "$$Test@@_$$" Remember, they are inforcing a password scheme now.
$PWD = "yourpassword"
;Required files: cusrmgr.exe from Windows 2000 Resource Kit
;========================
;= Do Note Edit Below =
;========================
IF OPEN (1,"PCLIST.TXT",0) = 0
$LINEINFO = READLINE(1)
WHILE @ERROR = 0
? "PCNAME: $LINEINFO"
?
SHELL '%COMSPEC% /C cusrmgr -u $USERNAME -m \\$LINEINFO -P $PWD'
SELECT
CASE @ERROR = "0"
? "Successful"
SHELL "%COMSPEC% /C echo $LINEINFO,Success>> admin_log.csv"
CASE @ERROR = "53"
? "No PC Found"
SHELL "%COMSPEC% /C echo $LINEINFO,No PC Found>> admin_log.csv"
CASE @ERROR = "5"
? "Access Denied"
SHELL "%COMSPEC% /C echo $LINEINFO,Access Denied>> admin_log.csv"
CASE @ERROR = "2245"
? "Invalid Password"
SHELL "%COMSPEC% /C echo $LINEINFO,Invalid Password>> admin_log.csv"
CASE 1
? "Weird Error"
SHELL "%COMSPEC% /C echo $LINEINFO,Weird Error>> admin_log.csv"
ENDSELECT
$LINEINFO = READLINE(1)
?
LOOP
$RC = CLOSE (1)
ELSE
EXIT 0
ENDIF
EXIT 0
I use it all the time. Hope it helps you!
_________________________
Move out of my way or I'll replace you with a kix script.