Re: local administrator account
- From: Jerold Schulman <Jerry@xxxxxxxxxx>
- Date: Sat, 22 Jul 2006 09:10:45 -0400
On 21 Jul 2006 12:34:40 -0700, jnm125a@xxxxxxxxx wrote:
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
.
- Follow-Ups:
- Re: local administrator account
- From: jnm125a
- Re: local administrator account
- References:
- local administrator account
- From: jnm125a
- local administrator account
- Prev by Date: local administrator account
- Next by Date: Re: local administrator account
- Previous by thread: local administrator account
- Next by thread: Re: local administrator account
- Index(es):
Relevant Pages
|