Sample script using Active Directory Service Interfaces
Add active directory group to local administrators group
This script will add the specified domain group to the workstations’ Administrators group.
The script uses the ‘Workstation’ service.
Sub Scense_Main() Dim dsGrp 'Bind to the local administrators group Set dsGrp = GetObject("WinNT://" & Workstation.ComputerName & "/Administrators,group") 'Add the AD group dsGrp.Add ("WinNT://MYDOMAIN/MYGROUP,group") 'Clean up Set dsGrp = Nothing End Sub