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,

T. Eynon

Recommended Answers

All 2 Replies

I have done it before and cant quite remember but this should set you off:

net user domain\user /add localhost\administrator

You can run it as a logon script but the script must have admin rights therefore you will need to logon to each machine to use it or use a Group Policy. You can use the variable %username% for the logged on user.

Hop this helps.

I have done it before and cant quite remember but this should set you off:

net user domain\user /add localhost\administrator

You can run it as a logon script but the script must have admin rights therefore you will need to logon to each machine to use it or use a Group Policy. You can use the variable %username% for the logged on user.

Hop this helps.

Thanks for the advice. I was able to get it to work using the following in a batch file:
net localgroup administrators /add %domain%\%user%

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.