是否可以从客户端上运行的PowerShell脚本访问Exchange 2010通讯簿?
我想访问地址簿,按属性搜索并使用结果。

我还没有找到有关EWS和PowerShell的任何教程。

[Reflection.Assembly]::LoadFrom("path to ews.dll")


$ExchangeService = new-object ExchangeServiceBinding

$paramName = New-Object UserConfigurationNameType
$paramName.Item = New-Object FolderIdType
$paramName.Name = "CategoryList"

$params = New-Object GetUserConfigurationType
$params.UserConfigurationName = $paramName
$params.UserConfigurationProperties = [UserConfigurationPropertyType]::ALL


$ExchangeService.UseDefaultCredentials
$ExchangeService.Url = "https://path.to.exchange/EWS/Exchange.asmx"
$ExchangeService.GetUserConfiguration($params)

最佳答案

您需要Exchange EWS托管API:

http://msdn.microsoft.com/en-us/library/dd637749.aspx

08-07 04:19