title: PowerShell, Exchange 2010 Addressbook
body: <p>It is possible to access Exchange 2010 Addressbook from a PowerShell Script which is running on a client?
  I want to access the addressbook, search by properties and work with the results.</p>
  
  <p>I have not found any tutorial for the EWS and PowerShell.</p>
  
  <pre><code>[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)
  </code></pre>