Question Locked

Add users via script (Win 2000/Server 2003)

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have a large amount of users I need to add to
the local admin group on a collection of
machines running both Win 2000 and Server 2003.
Is there a script that would allow me to do
this? The user accounts already exist within
AD, they are not new users. Any
help/suggestions would be greatly appreciated.
Thank you in advance.

4 replies

by marc.watters

I wrote a batch file, copied it to each
server and ran it. Here is the batch file:

net localgroup administrators DOMAIN\USERNAME
/ADD
(REPEAT FOR EVERY USER TO BE ADDED)
PAUSE ; To check for errors

Some of the users were already members of the
admin group, but the script bypassed the
errors and continued to run. Now I will
attempt to script the functionality of
entering in each user before the rest of the
script runs so the batch file doesn't have to
be edited each time. If I get that working,
I'll post here as well. Thank you for your
guidance and I hope this helps someone else!

This discussion is closed to new replies.