
ADSI Global Groups / Local Groups
Try this
ComputerName = "PC1"
LocalGroup = "Administrators"
GlobalGroupADSPath = "WinNT://DOMAIN/D-ISV"
Set GroupObj = GetObject("WinNT://" & ComputerName & "/" & LocalGroup)
GroupObj.Add(GlobalGroupADSPath)
Set GroupObj = Nothing
Clarence
http://cwashington.netreach.net
On THIS site you will find everything you need to get up and running. A
script repository with over 250 FREE sample scripts, a downloads section
with FREE COM objects for scripting, a library of reference materials and a
online discussion lounge to provide community based technical support. Check
it out.
Quote:
> Is there a way to use ADSI to add a global group to a local group.
> What I am trying to accomplish is as follows.
> A site has 500 Windows NT workstations (NTW) that are members of single
> domain. The IS departments needs to "administrators of the local
machines.
> All IS people are members of the Domain Global Group "D-ISV". I want to
use
> a script to parse a text file of NTW machine names, access the local NTW
> SAM, add the global group D-ISV to the local group Administrators.
> This script errors....
> ComputerName = "PC1"
> Set DomainGroup = GetObject("WinNT://DOMAIN/D-ISV")
> LocalGroup = "Administrators"
> Set GroupObj = GetObject("WinNT://" & ComputerName & "/" & LocalGroup)
> GroupObj.Add ("WinNT://" & ComputerName & "/" & DomainGroup)
> Set DomainObj = Nothing
> Set GroupObj = Nothing
> Any help is appreciated...
> thanks