Re: Group Policy questions



Hi Carl O,

Sorry Carl, my mistake for not add any comments in code.

Assume the follwing cenario:

Domain name = XPTO
Domain Global Security Group = ITTechnicians

Purpose = add ITTechnicians Domain Group to Administrators Local Group
'-------------------------------------------------------------
Set wshNetwork = CreateObject("WScript.Network")
ComputerName= wshNetwork.ComputerName

localstr="WinNT://" & Computername

'Get domain group and assigned to ITTechs Variable
ITTechs="WinNT://XPTO/ITTechnicians"

'Add Domain Group to Administrators Local Group
AddToGroup ITTechs, "Administrators"

Function AddToGroup(member, Grpname)

Dim grp1
Set grp1 = Getobject(localstr&"/"& Grpname,group)
grp1.Add (member)

End Function
'-------------------------------------------------------------

Please let me know if you have some questions.

Regards,
.