111111111111

  1. DirectorySearcher directorySearch = new DirectorySearcher(SearchRoot);  
  2. directorySearch.Filter = "(&(objectClass=organizationalUnit)(ou=" + ouName + "))";  
  3. SearchResult results = directorySearch.FindOne();  
  4. if (results != null)  
  5. {  
  6.     DirectoryEntry entry = results.GetDirectoryEntry();  
  7. }  

DirectorySearcher directorySearch = new DirectorySearcher(SearchRoot); directorySearch.Filter = "(&(objectClass=organizationalUnit)(ou=" + ouName + "))"; SearchResult results = directorySearch.FindOne(); if (results != null) { DirectoryEntry entry = results.GetDirectoryEntry(); }

posted on 2013-09-22 11:38  YoungPop_Chen  阅读(294)  评论(0编辑  收藏  举报

导航