列出exchange 2003邮箱权限

发布于 2024-07-13 01:34:02 字数 84 浏览 5 评论 0原文

如何列出已分配给域用户邮箱的权限?

例如,在 AD 用户和 AD 用户的“交换高级”选项卡的“邮箱权限”部分中指定的帐户。 电脑?

How can i list the rights that have been assigned to a domain users mailbox?

e.g. The accounts that are specified in the "Mailbox Rights" section of the "Exchanged Advanced" tab of AD Users & Computers?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

九局 2024-07-20 01:34:02

哟,这真是太恶心了。 由于没有 .NET 包装器(我上次检查时是在 1.1 版本中),因此您需要与 CDOEXM 进行 COM 互操作。

这里有一些伪代码,我希望它们能让你抢占先机:

DirectoryEntry userDirectoryEntry; // you need to new this up
IExchangeMailbox exchangeMailbox = (IExchangeMailbox)userDirectoryEntry.NativeObject;
IADsSecurityDescriptor securityDescriptor = (IADsSecurityDescriptor) exchangeMailbox.MailboxRights;   
IADsAccessControlList acl = (IADsAccessControlList) securityDescriptor.DiscretionaryAcl;
// Iterate thru each ACE in the ACL
foreach ( IADsAccessControlEntry ace in acl)
{
     // in here, you'll have access to each "ace"
}                                

Yo, this is pretty gross stuff. Since there are no .NET wrappers (last time I checked, which was back in 1.1 daze), you'll need to do COM interop with CDOEXM.

Here's some pseudocode that I hope will give you a head-start my brutha:

DirectoryEntry userDirectoryEntry; // you need to new this up
IExchangeMailbox exchangeMailbox = (IExchangeMailbox)userDirectoryEntry.NativeObject;
IADsSecurityDescriptor securityDescriptor = (IADsSecurityDescriptor) exchangeMailbox.MailboxRights;   
IADsAccessControlList acl = (IADsAccessControlList) securityDescriptor.DiscretionaryAcl;
// Iterate thru each ACE in the ACL
foreach ( IADsAccessControlEntry ace in acl)
{
     // in here, you'll have access to each "ace"
}                                
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文