为什么PrincipalSearcher为System .__ ComObject提供msExchRecipientDisplayType属性? [英] Why PrincipalSearcher gives System.__ComObject for attribut msExchRecipientDisplayType?

查看:109
本文介绍了为什么PrincipalSearcher为System .__ ComObject提供msExchRecipientDisplayType属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么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

如此处所述 https://answers.microsoft.com/zh-cn/msoffice/forum/msoffice_o365admin-mso_exchon-mso_o365b/recipient-type-values/7c2620e5-9870-48ba-b5c2-7772c739c651

但是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属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆