[英]List exchange 2003 mailbox rights
How can i list the rights that have been assigned to a domain users mailbox? 如何列出已分配给域用户邮箱的权限?
eg The accounts that are specified in the "Mailbox Rights" section of the "Exchanged Advanced" tab of AD Users & Computers? 例如,在AD用户和计算机的“已交换的高级”选项卡的“邮箱权限”部分中指定的帐户?
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.
由于没有.NET包装器(我上次检查时是1.1发呆),因此需要使用CDOEXM进行COM互操作。
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"
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.