how to add a domain user to the local admins on multiple servers.
Needed to add a user to the local administrators on 16 citrix servers, below is the code if you need it.
psexec @servers.txt cmd /c “net localgroup Administrators /add domain\username”
this doesnt work with multiple usernames at one time.
get psexec here: www.sysinternals.com
servers.txt is a text file containing a list of servers, i.e:
server1
server2
etc
A
Categories: Administration, Scripting
psexec, script, Sysinternals, Windows
Recent Comments