From: dirk on 24 Feb 2010 09:16 I have made a more compact script to enumerate nested active directory groups, it can be found here: http://deludi.nl/blog/vbscript/active-directory/groups/active-directory-vbscript-to-enumerate-the-members-of-nested-groups-v2/ pjglick wrote: Re: Enumerate group members and nested group 27-Aug-07 Thank you very much for the response. Previous Posts In This Thread: On Friday, August 24, 2007 12:30 PM pjglick wrote: Enumerate group members and nested group I am working on a script that would enumerate our Active Directory and return all Groups. I would then like to enumerate all the members of that group. Is there a way to determine if a group member is a user account or a nested group? After determining that the member is a group then I would need to access the group properties so that I can then enumerate its members. I may be wrong but I thought there might be a method or property called IsGroup. Any help would be greatly appeciated. Thank you Paul On Friday, August 24, 2007 1:14 PM Richard Mueller [MVP] wrote: Re: Enumerate group members and nested group Paul wrote: The Class method of the member object indicates the class of the member, either "User", "Group", or "Computer". If you are enumerating all groups in the domain, you perhaps can just enumerate direct members and indicate the class of each member. The group nesting can be determined from the output. If you use a recursive sub or function to enumerate the nested members of each group, many group memberships will get enumerated multiple times. Plus you need to code to avoid an infinite loop if you have any circular nested group situations (for example, GroupA is a member of GroupB, GroupB is a member of GroupC, and GroupC is a member of GroupA). I have an example VBScript program that uses ADO to retrieve all groups, then enumerates the direct members of each group and indicates which members are groups. The program is linked here: http://www.rlmueller.net/Document%20Domain%20Groups.htm There is no IsGroup method I know of. There is an IsMember method of group objects, but that is used to determine if a given object is a direct member of the group. -- Richard Mueller Microsoft MVP Scripting and ADSI Hilltop Lab - http://www.rlmueller.net -- On Monday, August 27, 2007 4:09 PM pjglick wrote: Re: Enumerate group members and nested group Thank you very much for the response. Submitted via EggHeadCafe - Software Developer Portal of Choice How to Annotate Images from a database in a web page http://www.eggheadcafe.com/tutorials/aspnet/0c4c3072-6730-41db-a759-082c24acd999/how-to-annotate-images-fr.aspx
|
Pages: 1 Prev: com.sun.star.lang.Locale Next: Using VBScript to Check for Network Share File? |