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

Posted: 09-21-2005, 07:46 PM
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



Reply With Quote

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

Torgeir Bakken \(MVP\)
Guest
Posts: n/a
 
Re: How do I add a domain group to a local group via wmi? (remotely)
Posted: 09-22-2005, 12:30 PM
Bruce D. Meyer wrote:
> 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.



--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scr...r/default.mspx
Reply With Quote
Bruce D. Meyer
Guest
Posts: n/a
 
Re: How do I add a domain group to a local group via wmi? (remotely)
Posted: 09-22-2005, 01:16 PM
Thank you very much,
So much to learn...

--Bruce D. Meyer


"Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote in message
news:OLdjmk2vFHA.908@tk2msftngp13.phx.gbl...
> Bruce D. Meyer wrote:
>
> > 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.
>
>
>
> --
> torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
> Administration scripting examples and an ONLINE version of
> the 1328 page Scripting Guide:
> http://www.microsoft.com/technet/scr...r/default.mspx

Reply With Quote
Rodolfo Parrado Gutiérrez [MVP]
Guest
Posts: n/a
 
Re: How do I add a domain group to a local group via wmi? (remotely)
Posted: 11-19-2005, 02:57 PM
see the GPO Restricted Groups...

"Bruce D. Meyer" <bdmeyer44@msn.com> wrote in message news:eWq$$92vFHA.1716@TK2MSFTNGP10.phx.gbl...
> Thank you very much,
> So much to learn...
>
> --Bruce D. Meyer
>
>
> "Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com> wrote in message
> news:OLdjmk2vFHA.908@tk2msftngp13.phx.gbl...
>> Bruce D. Meyer wrote:
>>
>> > 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.
>>
>>
>>
>> --
>> torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
>> Administration scripting examples and an ONLINE version of
>> the 1328 page Scripting Guide:
>> http://www.microsoft.com/technet/scr...r/default.mspx
>
>
Reply With Quote
 
LinkBack Thread Tools Display Modes
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
remotely query group membership of machine via script/wmi sumGirl Windows XP WMI 3 11-30-2004 02:40 PM
Add Domain user to Local Group via vb script Jason Windows XP Configuration & Management 5 09-05-2004 10:06 PM
Group membership Ray Windows XP Configuration & Management 2 06-26-2004 09:20 AM
We have a TROLL in this group! SCW Windows XP Movie Maker 3 08-07-2003 09:58 PM
Adding user to Local Group Administrator tkotten Windows XP Security & Administration 0 07-02-2003 11:32 PM


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90