Re: local administrator account

Tech-Archive recommends: Fix windows errors by optimizing your registry



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
.



Relevant Pages

  • Re: Server seems isolated cant chage location
    ... Server 2003 this box is a member of my domain. ... domain users to local administrator group or add domain users to ... check that your IP config lists only your internal DNS ...
    (microsoft.public.windows.server.general)
  • local administrator account
    ... i would like to create a batch file that wiill add local users and ... domain users to the local administrator group on a server, ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Re: SMS and Machine$ account permissions?
    ... If you're using the Server 2003, click the add to group, select the 'Object ... When you add a computer account, ... but i tried that command and it didn't work [net helpmsg ... >> net localgroup administrators domain\machine$ /add. ...
    (microsoft.public.sms.setup)
  • Re: localgroup administrators
    ... admins to local group administrators on workstations. ... I am trying to use net localgroup administrators ... Using a startup script with only test computers having read access. ... When you say "domain users" are you meaning specific domain ...
    (microsoft.public.windows.group_policy)
  • Re: SiteSystemToSQLConnection Membership
    ... Things I would try are removing and re-adding the account. ... & Reboot the MP (allthough this shouldn't be necessary, ... > I assume you want me to do this on the SQL server (which is also the SMS Site ...
    (microsoft.public.sms.setup)