DirectoryEntry rootEntry = nowy DirectoryEntry ("LDAP: ///dc=DOMAIN, dc=COM");
DirectorySearcher dsFindOUs = nowy DirectorySearcher (rootEntry);
dsFindOUs.Filter = "(objectClass=organizationalUnit)";
dsFindOUs.SearchScope = SearchScope.Subtree;
foreach (SearchResult rezultat w dsFindOUs.FindAll ())
{
Console.WriteLine (rezultat. Ścieżka);
}
|