111111111111
- DirectorySearcher directorySearch = new DirectorySearcher(SearchRoot);
- directorySearch.Filter = "(&(objectClass=organizationalUnit)(ou=" + ouName + "))";
- SearchResult results = directorySearch.FindOne();
- if (results != null)
- {
- DirectoryEntry entry = results.GetDirectoryEntry();
- }
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) 编辑 收藏 举报