rootEntry DirectoryEntry = nieuwe DirectoryEntry („LDAP: ///dc=DOMAIN, dc=COM“);
DirectorySearcher dsFindOUs = nieuwe (rootEntry) DirectorySearcher;
dsFindOUs.Filter = „(objectClass=organizationalUnit)“;
dsFindOUs.SearchScope = SearchScope.Subtree;
foreach (resultaat SearchResult in dsFindOUs.FindAll ())
{
Console.WriteLine (resultaat. Weg);
}
|