问题描述
为什么PrincipalSearcher为System .__ ComObject赋予属性msExchRecipientDisplayType?
Why PrincipalSearcher gives System.__ComObject for attribut msExchRecipientDisplayType ??
我想检索属性 msExchRecipientDisplayType ,并且 PrincipalSearcher 给出 System .__ ComObject .我也尝试通过 DirectorySearcher 检索它,并给出正确的值
I want to retrieve attribute msExchRecipientDisplayType and PrincipalSearcher gives System.__ComObject. Also I tried to retrieve it by DirectorySearcher and it gives correct value
即".
0个UserMailbox(共享)
1个MailUniversalDistributionGroup
6 MailContact
7 UserMailbox(会议室)
8 UserMailbox(设备)
1073741824 UserMailbox
1073741833 MailUniversalSecurityGroup
0 UserMailbox (shared)
1 MailUniversalDistributionGroup
6 MailContact
7 UserMailbox (room)
8 UserMailbox (equipment)
1073741824 UserMailbox
1073741833 MailUniversalSecurityGroup
但是DirectorySearcher仅具有1000个限制?
But DirectorySearcher has only 1000 limit ??
推荐答案
没有看到您的代码,我不知道为什么您看到msExchRecipientDisplayType
属性的System.__ComObject
值.
Without seeing your code, I don't know why you're seeing a System.__ComObject
value for the msExchRecipientDisplayType
attribute.
关于1000个结果的限制:这是Active Directory的限制,而不仅仅是DirectorySearcher
.为了获得更多结果,您需要启用分页,这可以通过设置DirectorySearcher的="nofollow noreferrer"> PageSize
属性.只需将其设置为1000
,它将继续为接下来的一千个查询,直到没有其他查询为止.例如,
About the 1000 result limit: this is a limit from Active Directory, not just DirectorySearcher
. To get more results, you need to enable paging, which you can do by setting the PageSize
property of the DirectorySearcher
. Just set it to 1000
and it will keep making new queries for the next thousand until there are no more. For example,
var ds = new DirectorySearcher() {
Filter = "(&(objectClass=user)(objectCategory=person))",
PropertiesToLoad = { "msExchRecipientDisplayType" },
PageSize = 1000
};
这篇关于为什么PrincipalSearcher为System .__ ComObject提供msExchRecipientDisplayType属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!