Powershell: An error occurred while trying to sync mailboxes.


  1. This error is observed in the verbosed ACC logs when integrating with Powershell using it. It is also found in the verbosed Admin Console logs, if we are not leveraging the ACC.
  2. This error is also observed in the EIS logs when using the EIS to connect to ACC

The exact error is displayed as below.

An error occurred while trying to sync mailboxes. (Error retrieving CAS mailbox list records 1 to 2500 at ExchangeService https://exchange_DNS/powershell/ via EIS @ https://EIS_DNS/enterpriseintegrationservice/. Error: Request failed. ActivityId: 87645fg-r534279809, ErrorMessage: List CAS devices mailboxes failed for records 1 to 2500. Error message: Error executing 'AW-Get-CASMailboxList'. Endpoint: 'Domain_Namec\EIS_Account@Microsoft.Exchange@https://exchange_DNS/powershell/': Exception Message: A positional parameter cannot be found that accepts argument 'HasActivesyncDevicePartnership -eq $true'. + CategoryInfo: InvalidArgument: (:) [Get-CASMailbox], ParameterBindingException + FullyQualifiedErrorId: PositionalParameterNotFound,Get-CASMailbox



This error could be caused because of many reasons.

  1. User account used for powershell in the Admin Console of AirWatch is not a Powershell Admin user.
  2. The user account used is not a member of the required groups.
  3. The client is using an un-supported version of powershell.
  4. Sometimes the session cannot be established, hence the sync commands cannot be run. 



  1. Ensure that the user account is a Powershell admin user.
  2. Ensure that the user account is added to the AW PS and the Mail Recipient role groups on exchange
  3. Ensure that the session to powershell can be established from the ACC or the console server.


Note:  When using AirWatch Versions 8.2 and above, Powershell sessions can only be established with Powershell version V.3 

Have more questions? Submit a request


Article is closed for comments.