Logon script to add a user to local admin group

I have a single domain with 3000+ workstations, varying from Windows 2000 to XP. Is there a logon script process to add a user to the local admin group? We manually add the domain user account to the local admin account for certain applications that require admin access. I came across the ADDUSERS.exe command, but it prompts the user for a password. Is there any command that can perform this without prompting the user for any information? Thanks in advance for your time and help.
This is a common issue. The problem is that if you could add a restricted user to the local administrators group without a password, how could you prevent users from adding themselves to the local administrators group? Thus, only a local administrator can add a user to the local administrators group. You could use Cusrmgr (Windows 2000 Resource Kit) and specify a password on the command line, but that's just not very safe. Instead, I recommend that you create a WMI script to connect to the computer and then add the user to the local administrators group. Check out Microsoft's script Web site for a number sample scripts.
This was first published in October 2003

Dig Deeper on Windows Operating System Management

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.



Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: