首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Exchange邮箱DirectoryEntry属性列表

Exchange邮箱DirectoryEntry属性列表
EN

Stack Overflow用户
提问于 2014-11-21 15:51:01
回答 1查看 225关注 0票数 0

您能告诉我它是否存在exchange对象的DirectoryEntry属性列表吗?

下面是我的代码示例:

代码语言:javascript
复制
// create your domain context
PrincipalContext ctx = new PrincipalContext(ContextType.Domain, ConfigurationManager.AppSettings["ADDomain"].ToString(), ConfigurationManager.AppSettings["ADUser"].ToString(), ConfigurationManager.AppSettings["ADPassword"].ToString());

// define a "query-by-example" principal - here, we search for all users
UserPrincipalEXT qbeUser = new UserPrincipalEXT(ctx);

// create your principal searcher passing in the QBE principal    
PrincipalSearcher srch = new PrincipalSearcher(qbeUser);

// find all matches
foreach (var found in srch.FindAll())
{  
    if (found.GetUnderlyingObjectType() == typeof(DirectoryEntry))
    {
        DirectoryEntry de = (DirectoryEntry)found.GetUnderlyingObject();
    }                 
}

我很难找到我需要的房产的名字.

谢谢!

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-11-21 15:58:00

DirectoryEntry.PropertiesPropertyCollection型的。这公开了可以用于枚举属性的属性(如PropertyNames )。

代码语言:javascript
复制
foreach (var name in de.Properties.PropertyNames)
{
    Console.WriteLine(name);
}
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/27065239

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档