1
我有以下代碼:使用的DirectorySearcher查詢多個OU
var directoryEntry = new DirectoryEntry(distributionListsListADSPath);
var directorySearcher = new DirectorySearcher(directoryEntry)
{ SizeLimit = int.MaxValue, PageSize = int.MaxValue };
var result = directorySearcher.FindAll();
的問題是我要搜索兩個單獨的OU。
所以,我做的是通過這個運行兩次,一次是在那裏
private const string distributionListsListADSPath =
"LDAP://OU=Distribution Lists,OU=Groups,DC=enron,DC=com";
和第二它是
private const string distributionListsListADSPath =
"LDAP://OU=Security Groups,OU=Groups,DC=enron,DC=com";
理想情況下,我可以做類似
private const string distributionListsListADSPath =
"LDAP://OU=Distribution Lists | OU = Security Groups ,OU=Groups,DC=enron,DC=com";
將這個過濾器給任何性能問題? (OU = 0002,OU =組,DC = abc,DC = com)...(OU = 0999,OU = Groups,DC = abc,DC = com) DC = abc,DC = com))' – 2016-10-14 09:46:23