
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
>.