i would like to create a batch file that wiill add local users and
domain users to the local administrator group on a server, can anyone
help me with this?
jnm
NewAdmins User1 User2 ... UserN
where each user is either the local UserName or DomainName\UserName
NewAdmins.bat contains:
@echo off
if {%1}=={} @echo Syntax: NewAdmins User1 [User2 ... UserN]&goto :EOF
:loop
if {%1}=={} goto :EOF
@echo net localgroup Administrators %1 /ADD
net localgroup Administrators %1 /ADD
SHIFT
goto :loop
Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
http://www.jsifaq.com