Hi all,
I have a piece of code (see below) which is used to retrieve all
user/groups
and their members. This works fine in many network environments, except in
this network where the code was used recently. Are there any conditions
which cause the members property to be empty? The code DOES work for
BUILT_IN groups like "Administrators" and "Guests", but when a custom
domain
group is retrieved, the members property stays empty. (and this problem
only
occurs in one particular network). Some information:
- The user is a Domain Admin
- There are custom domain groups which have other custom domain groups as
a
member.
- All the domain groups are found in the first For Each loop.
- Only the members of the BUILT_IN groups are found in the seconde For
Each
loop
- Normally this code works fine, so perhaps it's caused by the network
environment
- The IAdsUser.Groups property works fine in this network (used in an
other
piece of code)
--------------------------------------------------
Set GroupObjectArray = GetObject("WinNT://" & strDomain)
GroupObjectArray.Filter = Array("Group")
For Each GroupObject In GroupObjectArray
//this does work for BUILT_IN domain groups and for custom domain
groups
Set memberList = GroupObject.Members
memberList.Filter = Array("Group")
For Each MemberGroupObject In memberList
//this only works for BUILT_IN domain groups. Normally this
works fine for all groups.
//groupObject = "BUILTIN\Administrators"
//memberGroupObject = "domain\Domain Admins"
Next MemberGroupObject
Next GroupObject
--------------------------------------------------
Anyone any ideas?
Thanks!