clintax said:
hi guys!
need you help here....
how do i change my workstation local admin password without going to the
manual process, is there a script or other 3rd party tool to change this?
the thing is I have 2,000 desktops and my boss wants to change the current
admin password.
What say you?
thanks and more power!
Let's assume that you have a list of all NetBIOS names
on your own PC in c:\PCs.txt.
Let's also assume that you have a file
\\SomeServer\SomeShare\ResetPW.bat. This
file is accessible to admins only.
You can now run this batch file on your own PC once
every day for a couple of weeks:
@echo off
for /F %%a in (c:\PCs.txt) do {
ping %%a -n 1 | find /i "bytes=" && psexec \\%%a -u LocalAdmin
-p LocalAdminPassword \\SomeServer\SomeShare\ResetPW.bat
(unwrap this line!)
}
ResetPW.bat
==========
@echo off
if exist \\SomeServer\SomeShare\%ComputerName%.txt goto :eof
net user administrator newpassword
echo %date% %time% > \\SomeServer\SomeShare\%ComputerName%.txt
Note this:
- psexec.exe is available from www/sysinternals.com
- "LocalAdmin" must be an account that has administrative
rights on each local machine. It must also have write-access
to \\SomeServer\SomeShare.
- No doubt you will miss many machines on the first pass. By
rerunning the command each day, you will eventually catch
most machines. The ones you don't catch you'll have to do
manually.