basic Active Directory question RRS feed

  • Question

  • User-199970612 posted
    My Goal: 1. Output a list of all groups in active directory that start with a period. 2. Output all of the members within these groups. Does anyone have any code samples that can point me in the right direction? I'm familiar with vb.net. thanks, Keith
    Tuesday, December 21, 2004 4:23 PM

All replies

  • User-199970612 posted
    This may help: Dim enTry As DirectoryEntry = New DirectoryEntry("LDAP://server/OU=Distribution & Security Groups,OU=Dallas,OU=Central,DC=domain,DC=pvt", "username", "Password") Dim mySearcher As DirectorySearcher = New DirectorySearcher(enTry) mySearcher.Filter = ("(&(objectCategory=group)(displayName=.*))") Dim resEnt As SearchResult For Each resEnt In mySearcher.FindAll() Response.Write(resEnt.GetDirectoryEntry().Name) Next One note, I got this to output all the groups starting with a period. Now I need to figure out how to search the entire domain rather than a specific OU. In addition, I need it to output the members of the group. thanks, Keith
    Tuesday, December 21, 2004 5:12 PM
  • User1989792771 posted
    did u ever figure out #2?
    Wednesday, March 2, 2005 11:46 AM
  • User1354132231 posted
    See these posts for examples of how to enumerate groups (there are many ways): <post>32858</post> <post>122261</post>
    Wednesday, March 2, 2005 3:31 PM