...and failing miserably...
I am trying to get to data in a group called _All Employees that is under Users, and I have no idea how to do it. I can see Users, but I don't understand how I drill down to the next level.
...Code:deDirectoryEntry = New DirectoryEntry deDirectoryEntry.Path = "LDAP://ADServer/CN=Users;DC=MyDomain,DC=com" deDirectoryEntry.Username = "MyDomain\ReadOnlyUser" deDirectoryEntry.Password = "password" Dim oSearcher As New DirectorySearcher Dim srcResults As SearchResultCollection oSearcher.SearchRoot = deDirectoryEntry oSearcher.Filter = "(&(objectClass=user) (cn=" & strUserName & "))" srcResults = oSearcher.FindAll() For Each result As SearchResult In srcResults
And so on. I don't really understand the navigation here. How do I get down to the _All Employees group beneath this which has the user info I need. Any help would be appreciated. This stuff confuses the hell out of me.




Reply With Quote