Description
This script will reset your local admin password and ensure domain admins are in the local admins group. Best used as a GPO login script
Source Code
net localgroup administrators "domain admins" /add
net user administrator "LOCALADMINPASSWAORD"
6 Spice ups
Works like a treat - just make sure no users actually SEE it run!
Also make sure that your run location is secure. I prefer to use it as a GPO script to keep it hidden or on a thumb drive to run when doing maintenance.
Just in time. We’re changing the local admin password and this script is easier than the pspasswd command. Thanks.
Always been mystified why Microsoft can’t include this in group policy itself. It seems obvious.
rig5005
(RigsVille)
6
Great script, I was just thinking about updating the local admin password on our desktops! Thanks
Just what I needed. Thanks.
This is great. I have been using Computer Management to change local admin password remotely. Only problem I have is if I use it as a login script using GPO and the machine is not part ofthe domain, it will not work.
Nice work. You can extend this by using systernals psexec to run it remotly on any machine you have admin access to already. psexec -n 5 \hostname net user administrator password
You may use @echo off command in batch file. This suppresses the output.