使用EWS API创建新的用户/重置密码

时间:2016-01-01 16:44:38

标签: c# web-services powershell exchange-server exchangewebservices

我很确定我知道答案,但我正在寻找验证。一些背景:

  • 我的作业使用运行2010 SP2的Exchange服务器

  • 它由供应商非现场托管

  • 它没有绑定到我们的活动目录,我无法访问他们的

  • 我拥有通过OWA门户网站进行更改的管理员凭据

到目前为止,使用EWS,我已经能够执行搜索用户但无法更改任何内容的操作。我希望能够更改密码并创建新帐户。我看到有可能,如果我a)可以访问供应商活动目录或b)可以远程执行powershell ...但我没有。

我也发现了这一点,但它让我无处可去。使用管理员OWA管理员用户名和密码登录https://server/EWS/exchange.asmx,导致我https://server/ews/Services.wsdl我看到了这一点,但我找不到任何有价值的信息:

<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" targetNamespace="http://schemas.microsoft.com/exchange/services/2006/messages">
<wsdl:types>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="http://schemas.microsoft.com/exchange/services/2006/messages" schemaLocation="messages.xsd"/>
</xs:schema>
</wsdl:types>
<wsdl:message name="UploadItemsSoapIn">
<wsdl:part name="request" element="tns:UploadItems"/>
<wsdl:part name="Impersonation" element="t:ExchangeImpersonation"/>
<wsdl:part name="MailboxCulture" element="t:MailboxCulture"/>
<wsdl:part name="RequestVersion" element="t:RequestServerVersion"/>
</wsdl:message>
...

鉴于这种情况,无论如何都要在不使用OWA的情况下创建新帐户或更改用户密码?

1 个答案:

答案 0 :(得分:2)

EWS是一个邮箱访问API,只有在获取密码到期时才能执行任何管理操作(CRUD)或管理用户密码(OWA利用IIS功能执行此操作)。

要在Exchange 2010中创建邮箱,您需要通过远程Powershell访问权限访问Exchange管理控制台,Exchange命令行管理程序,或者至少应该具有使用ECP的功能,例如http://plexhosted.com/billing/knowledgebase/193/How-to-create-a-user-in-the-Exchange-Control-Panel-Exchange-2010.html

干杯 格伦