【问题标题】:Web-service-API to administrate Exchange-Accounts用于管理 Exchange 帐户的 Web 服务 API
【发布时间】:2014-07-17 16:13:36
【问题描述】:

是否有一个 web-service-API 可用于管理 exchange-server 2010 上的帐户(可以更新到 2013)?

到目前为止我发现了什么:

ECP(Exchange 控制面板):虽然提供了所有预期的功能,但它似乎不提供 Web 服务,而仅提供浏览器前端。我希望绕过浏览器抓取。

EWS(Exchange Web 服务):虽然是一种网络服务,但它似乎只提供标准客户端功能,不提供管理帐户本身的功能。

有什么建议吗?

托管的 C#-API 会很好...

【问题讨论】:

    标签: c# web-services exchange-server


    【解决方案1】:

    我没有找到执行此操作的 Web 服务,而是找到了 ExchangePowerShell。 为此,您需要安装 Exchange 管理工具(例如,此处解释为 http://exchangeserverpro.com/exchange-2010-install-management-tools/)和对 System.Management.Automation.dll 的引用(可通过 NuGet 获得)。

    为了让您开始,请在下面找到我用作概念证明的代码。

    WSManConnectionInfo connectionInfo = new WSManConnectionInfo(new Uri("http://{HostnameOfExchangeServer}/powershell"), "http://schemas.microsoft.com/powershell/Microsoft.Exchange", (PSCredential) null);
    Runspace runspace = RunspaceFactory.CreateRunspace(connectionInfo);
    using (PowerShell powershell = PowerShell.Create()) {
        powershell.AddCommand("Get-MailboxServer");
        runspace.Open();
        powershell.Runspace = runspace;
        return powershell.Invoke();
    }
    

    由于 PSCredential 设置为 null,因此使用普通 Windows 身份验证。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-04-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-09-19
      相关资源
      最近更新 更多