以编程方式查询我公司的员工目录
我的公司是一家微软商店(Exchange、AD等)。
我想对我们的员工目录进行查询,例如:
Person person = directory.Lookup("jsmith");
string title = person.Fields("JobTitle");
Person manager = person.GetManager();
if (person.IsManager())
{
Person[] subordinates = person.GetSubordinates();
}
有没有简单的方法可以做这样的事情?我打算在脚本中非正式地完成此操作,而不是在运输代码中。
My company is a Microsoft shop (Exchange, AD, etc.).
I'd like to do queries on our employee directory like:
Person person = directory.Lookup("jsmith");
string title = person.Fields("JobTitle");
Person manager = person.GetManager();
if (person.IsManager())
{
Person[] subordinates = person.GetSubordinates();
}
Is there any easy way to do something like this? I intend to do it on an informal basis in scripts, not in shipping code.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我从未使用过这个,但它看起来很有趣:
Linq to Active Directory
举个例子:
I've never used this but it looks interesting:
Linq to Active Directory
The give an example: