![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | nest group to multiple groups in ou Does anyone have a script that will nest a global group to all the groups in an ou? |
My System Specs![]() |
| | #2 (permalink) |
| | Re: nest group to multiple groups in ou Randy wrote: Quote: > Does anyone have a script that will nest a global group to all the > groups in an ou? group, the program could be: ========== ' Bind to the global group, using the Distinguished Name of the group. Set objGlobalGroup = GetObject("LDAP://cn=TestGroup,ou=West,dc=MyDomain,dc=com") ' Bind to the OU object, using the Distinguished Name of the OU. Set objOU = GetObject("LDAP://ou=East,dc=MyDomain,dc=com") ' Filter on group objects. objOU.Filter = Array("group") ' Enumerate all groups in the OU. For Each objGroup In objOU ' Check if the group is already a member. If (objGlobalGroup.IsMember(objGroup.AdsPath) = False) Then ' Add the group to the global group. objGlobalGroup.Add(objGroup.AdsPath) End If Next -- Richard Mueller MVP Directory Services Hilltop Lab - http://www.rlmueller.net -- |
My System Specs![]() |
![]() |
| Thread Tools | |
| |