Script or Batch file to load Administrators in XP

T. Eynon

OSNN Newbie
Joined
19 May 2006
Messages
3
Does anyone know how to create a batch or script file for loading users into the Local Groups Adminstrator folder of an XP PC. We have about 150 users that we would like to make administrators on for several test PCs and would like to do this with a batch or script file. If anyone knows how to do this please reply back with the syntax to place in the batch or script file.

Thanks
 
You could use a GPO and setup "restricted groups" specifically if you are running active directory.

If you really need a script, i could probably whip something up fairly quickly.
 
Thanks Fitz for the advice on the GP0. I was hoping not to have to involve my networking team.

I did find something with the following syntax but was not able to get it to work. It was for Windows 2000.

I really don't need to load users into a specific group like the last line shows all I really want to do is load them as an administrator in the administrators group file.

I was hoping to have a user be able to loads these admins by running a .bat file.

Thanks. Tim

Code found:

Net Localgroup Administrators

"Domain_Name\Developer1" /Add

Net Localgroup Administrators

"Domain_Name\Developer2" /Add

Net Localgroup Administrators

"Domain_Name\Developer3" /Add

Net Localgroup Administrators

"Domain_Name\Developer4" /Add

Net Localgroup Administrators

"Domain_Name\Developer5" /Add

And use

Net Localgroup Administrators

"Domain_Name\Developers_Group"

/Add
 
that code should work on XP also.. but it looks like you have the synax a little mixed up..

The commands should also be on the same line:

Code:
net localgroup administrators /add %domain%\%user%

Understand, in order to add to the administrator group, the batch file needs to be run as an administrator.
 

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back