Failed to connect to Exchange O365-certificate

When you run the Synctool or a custom PowerShell script, you see the following error:

Failed to connect to Exchange O365-certificate: Connecting to remote server outlook.office365.com failed with the following error message. For more information, see the About Remote Troubleshooting Help topic.

Cause

You are using an outdated version of the ExchangeOnlineManagement PowerShell module, or the module is not installed at all.

Solution

Update or install the ExchangeOnlineManagement PowerShell module (version 3) by following these steps:

  1. Run PowerShell as Administrator.
  2. To update the existing module, run the following command:
Update-Module -Name ExchangeOnlineManagement
  1. To install the module, run the following command:
Install-Module -Name ExchangeOnlineManagement