How do I add a domain group to a local group via wmi? (remotely)

B

Bruce D. Meyer

I want to add a Domain 'ITSupport group' to the 'local admins group' so the
members of this 'ITSupport group' can install software to local machines.
This change would have to be made on all the computers in our forest (about
1,000.) I don't 'think' this is something I can do with GPO, so my next
thought was to write a vbscript using WMI to do this.

Before I invest a lot of time into this, can anyone state definitevely
wether this can or can not be done?

--Bruce D. Meyer
 
T

Torgeir Bakken \(MVP\)

Bruce said:
I want to add a Domain 'ITSupport group' to the 'local admins group' so the
members of this 'ITSupport group' can install software to local machines.
This change would have to be made on all the computers in our forest (about
1,000.) I don't 'think' this is something I can do with GPO, so my next
thought was to write a vbscript using WMI to do this.

Before I invest a lot of time into this, can anyone state definitevely
wether this can or can not be done?
Hi,

I would have done it in a GPO based computer startup script.

The following command line will add the "ITSupport" domain
group to the local group "Administrators" (replace mydomainname with
your domain name):

net.exe localgroup "Administrators" "mydomainname\ITSupport" /ADD

Create a GPO based computer startup script that runs the command
above.

Computer startup script runs as part of the boot up process
(before the user logs in) and it runs under the system context
and has administrator rights.
 
?

=?iso-8859-1?Q?Rodolfo_Parrado_Guti=E9rrez_=5BMVP=

see the GPO Restricted Groups...

Bruce D. Meyer said:
Thank you very much,
So much to learn...

--Bruce D. Meyer
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top