简体   繁体   English

Office 365 Exchange邮箱属性

[英]Office 365 Exchange Mailbox Properties

I would like to know how to access a set of given mailboxes and get various properties on those mailboxes. 我想知道如何访问一组给定的邮箱并在这些邮箱上获取各种属性。 Specifically I would like to iterate through a list of email addresses, and spit out the type of mailbox (ie: room mailbox, user mailbox , etc.)and who and what type of access users have. 具体来说,我想遍历电子邮件地址列表,吐出邮箱的类型(即:房间邮箱,用户邮箱等)以及用户的访问者和类型。 I've been looking at url below, but cant find much on this type of thing. 我一直在看下面的url,但是在这种类型的东西上找不到很多。

https://code.msdn.microsoft.com/Office365/ https://code.msdn.microsoft.com/Office365/

An code samples would be greatly appreciated. 代码示例将不胜感激。

Pseudo Code: 伪代码:

ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2013);
var MyMailboxes = service.getMailboxes(MyListofMailboxes);

foreach(var mailbox in MyMailboxes)
{
    Console.WriteLine("MailboxType: {0}" + mailbox.MailboxType); 
    foreach(var userAccess in mailbox.UserAccess)
    {
         Console.Writeline("User: {0}, Access Level: {1}", userAccess.user, userAccess.AccessLevel);
    }
}

You need to use Remote Powershell to do that see https://msdn.microsoft.com/en-us/library/office/ff326159(v=exchg.150).aspx . 您需要使用Remote Powershell来执行此操作,请参阅https://msdn.microsoft.com/zh-cn/library/office/ff326159(v=exchg.150).aspx You can the use Get-Mailbox, Get-MailboxPermission and Get-MailboxFolderPermissions . 您可以使用Get-Mailbox,Get-MailboxPermission和Get-MailboxFolderPermissions。 EWS is only useful if you want to access the Mailbox content for Admin tasks you should use Remote Powershell. EWS仅在您要访问用于管理任务的邮箱内容时才有用,您应该使用远程Powershell。

Cheers Glen 干杯格伦

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM