Board index » Visual Studio » Enumerate Global Group using ADSI
|
RyanMcKay
|
Enumerate Global Group using ADSI
Visual Studio312
I have a Global group called FolderRedirection which also has nested global groups and I need to enumerate each user within the FolderRedirection group and also the nested ones. strDisplay = "" Set objContainer = GetObject_ ("LDAP://cn=FolderRedirection,ou=Groups,ou=Accounts,dc=Mydomain,dc=com") objContainer.Filter = Array("user") For each objUser In objContainer If strDisplay = "" Then strDisplay = objUser.sAMAccountName Else strDisplay = strDisplay & vbCrLf & objUser.sAMAccountName End If Next WScript.Echo strDisplay - |
