help Adding a Domain group to a Local Group 
Author Message
 help Adding a Domain group to a Local Group

I am in need of a VBScript to Place a global group from a NT4 domain into a
local Group on a W2k Client.

Thanks



Mon, 03 Oct 2005 00:05:06 GMT  
 help Adding a Domain group to a Local Group
I still find such operations to be simplest using net.exe.

createobject("wscript.shell").run "cmd.exe /c net localgroup administrators
domainname\groupname /add"

Ray at work


Quote:
> I am in need of a VBScript to Place a global group from a NT4 domain into
a
> local Group on a W2k Client.

> Thanks



Mon, 03 Oct 2005 00:27:36 GMT  
 help Adding a Domain group to a Local Group
This seems to let me add domain users but not domain groups.



Quote:
> I still find such operations to be simplest using net.exe.

> createobject("wscript.shell").run "cmd.exe /c net localgroup
administrators
> domainname\groupname /add"

> Ray at work



> > I am in need of a VBScript to Place a global group from a NT4 domain
into
> a
> > local Group on a W2k Client.

> > Thanks



Mon, 03 Oct 2005 02:32:30 GMT  
 help Adding a Domain group to a Local Group
It works fine for me.  For example, we have a group, DOMAIN\TempAdmin and to
add that domain-level GROUP to the local admin group on the machine, I just
execute:

net localgroup administrators domain\tempadmin /add

Ray at work


Quote:
> This seems to let me add domain users but not domain groups.



> > I still find such operations to be simplest using net.exe.

> > createobject("wscript.shell").run "cmd.exe /c net localgroup
> administrators
> > domainname\groupname /add"

> > Ray at work



> > > I am in need of a VBScript to Place a global group from a NT4 domain
> into
> > a
> > > local Group on a W2k Client.

> > > Thanks



Mon, 03 Oct 2005 02:54:48 GMT  
 help Adding a Domain group to a Local Group
Hi,

I have used code similar to below to add domain global
groups to a machine local group:

Set objNetwork = CreateObject("Wscript.Network")
Set objComputer = GetObject("WinNT://" _
  & objNetwork.ComputerName)
Set objLocalGroup = _
  objComputer.GetObject("group", "Administrators")
Set objGlobalGroup = _
  GetObject("WinNT://MyDomain/TestGroup,group")
objLocalGroup.Add(objGlobalGroup.AdsPath)
objLocalGroup.SetInfo

Richard
http://www.rlmueller.net

Quote:
>-----Original Message-----
>It works fine for me.  For example, we have a group,

DOMAIN\TempAdmin and to
Quote:
>add that domain-level GROUP to the local admin group on
the machine, I just
>execute:

>net localgroup administrators domain\tempadmin /add

>Ray at work



>> This seems to let me add domain users but not domain
groups.



>> > I still find such operations to be simplest using
net.exe.

>> > createobject("wscript.shell").run "cmd.exe /c net
localgroup
>> administrators
>> > domainname\groupname /add"

>> > Ray at work



>> > > I am in need of a VBScript to Place a global group
from a NT4 domain
>> into
>> > a
>> > > local Group on a W2k Client.

>> > > Thanks

>.



Mon, 03 Oct 2005 06:26:37 GMT  
 help Adding a Domain group to a Local Group
Thank You!!  this is exactly what I needed ;-)


Quote:
> Hi,

> I have used code similar to below to add domain global
> groups to a machine local group:

> Set objNetwork = CreateObject("Wscript.Network")
> Set objComputer = GetObject("WinNT://" _
>   & objNetwork.ComputerName)
> Set objLocalGroup = _
>   objComputer.GetObject("group", "Administrators")
> Set objGlobalGroup = _
>   GetObject("WinNT://MyDomain/TestGroup,group")
> objLocalGroup.Add(objGlobalGroup.AdsPath)
> objLocalGroup.SetInfo

> Richard
> http://www.rlmueller.net
> >-----Original Message-----
> >It works fine for me.  For example, we have a group,
> DOMAIN\TempAdmin and to
> >add that domain-level GROUP to the local admin group on
> the machine, I just
> >execute:

> >net localgroup administrators domain\tempadmin /add

> >Ray at work



> >> This seems to let me add domain users but not domain
> groups.



> >> > I still find such operations to be simplest using
> net.exe.

> >> > createobject("wscript.shell").run "cmd.exe /c net
> localgroup
> >> administrators
> >> > domainname\groupname /add"

> >> > Ray at work



> >> > > I am in need of a VBScript to Place a global group
> from a NT4 domain
> >> into
> >> > a
> >> > > local Group on a W2k Client.

> >> > > Thanks

> >.



Mon, 03 Oct 2005 23:22:30 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Add domain group to local group

2. Adding domain groups to gthe local administrator group

3. Adding a Domain Global group to a machine local group in Windows 2000

4. Adding a domain group to local administrators group

5. How do I add a domain global-groups in a member-server local group

6. VB script: adding AD group to local administrators group

7. Adding multiple users or groups to local groups

8. Add Global group to Local Group

9. Add Domain Users Group to Powe Users Group in Script

10. Add a domain group to local machine

11. How can I add a Domain Account to the Local Administrators Group

12. Add a domain group to local machine

 

 
Powered by phpBB® Forum Software