• Search Filter Syntax


     https://docs.microsoft.com/zh-cn/windows/win32/adsi/search-filter-syntax?redirectedfrom=MSDN

    https://blog.csdn.net/bytxl/article/details/11556195

     // Create a new DirectorySearcher that starts at the root.
        // You can start it anywhere you want though
        //     by providing a value in the DirectoryEntry constructor.
        DirectorySearcher searcher = new DirectorySearcher(new DirectoryEntry());
     
    // Set the scope to Subtree in order to search all children.
    searcher.SearchScope = SearchScope.Subtree;
     
    // Set the filter to only look for Organizational Units//     that have the name you are looking for.
    searcher.Filter = "(&(objectClass=organizationalUnit)(name=" + ouName + "))";
     
    // If you are looking for only one result then do the following two things.SearchResult results = searcher.FindOne();
    this.Properties = results.GetDirectoryEntry();
  • 相关阅读:
    Car HDU
    Defeat the Enemy UVALive
    Alice and Bob HDU
    Gone Fishing POJ
    Radar Installation POJ
    Supermarket POJ
    Moo Volume POJ
    Text Document Analysis CodeForces
    checkbox全选与反选

  • 原文地址:https://www.cnblogs.com/mqingqing123/p/14428640.html
Copyright © 2020-2023  润新知