• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 370
  • Last Modified:

What is the easiest way to add/remove a domain user to the local admin group of a workstation?

Once in a while, I need to give temporarily some domain user local admin privilege of a specific workstation. For ease of discussion, I make up some names here.

Windows 2003 server AD: svr-dc
domain user: userA
workstation (XP): pc-user
workstation (XP): pc-admin
Goal: look for some quick way (maybe script) to add/remove userA to/from the local admin group of pc-user.

Q#1. Is it possible to run some script (on demand) to achieve the above goal?
Q#2. Is there any other way (maybe better) to do this?

Thanks.
0
richtree
Asked:
richtree
6 Solutions
 
Netman66Commented:
If you run COMPMGMT.msc as your domain admin account you can remote connect using Manage>Connect to Computer.

From here you can remove/add users to the local Admin group.
0
 
richtreeAuthor Commented:
Yes, that works.
Any other way?
0
 
Netman66Commented:
Restricted Groups - but that's overkill.

you can run psexec to remotely run net group Administrators {username} /Add

0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LauraEHunterMVPCommented:
Download lg.exe from www.joeware.net/freetools.

lg.exe \\workstation\Administrators domain\jsmith -add

Assuming you are running the command with an account that has administrative rights to the remote w/s, works like a champ.
0
 
mastooCommented:
NET LOCALGROUP Administrators name1 /ADD
0
 
chokdiiCommented:
Hi,

If you want to script this into a batch file or similar script file, I would suggest using WMIC with usual DSADD command set.
I have not personally used it this way, but I am sure it can be easily done.

To invoke WMIC, just type that in the cmd prompt in a Domain admin account.
0
 
Netman66Commented:
Oops, yes - I'm on a DC!

net localgroup Administrators {username} /Add

lg.exe is Joe's version of Net, is it not?


0
 
richtreeAuthor Commented:
Thank you all for your wonderful ideas.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now