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

  • Thread starter Thread starter Bruce D. Meyer
  • Start date Start date
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
 
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.
 
Back
Top