Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fetching GROUPS from active directory based on DOMAIN and LOCATION

Status
Not open for further replies.

karumbu2004

Programmer
Joined
May 20, 2004
Messages
5
How to fetch all the AD Groups from Active directory for a specific DOMAIN and LOCATION using LDAP.

I have tried following code, which returns all groups for a domain, but i am unable to filter it out by LOCATION.

Dim enTry As DirectoryEntry = New DirectoryEntry("LDAP://SOMEDOMAIN")

Dim mySearcher As DirectorySearcher = New DirectorySearcher(enTry)
mySearcher.Filter = "(objectClass=group)"

Any help or direction is highly appreciated.

 
By location do you mean location as in the AD field location or as in the object's place in AD?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top