Symptoms

When you scan an Exchange On-Premises organization using the Microsoft Exchange Organization agent, you see the error "Could not connect to any Exchange server" and the following warnings are seen.


Your attempt to connect to this Exchange server was denied because your account isn't enabled for Remote PowerShell.

Cause

This can occur when the service account does not have the "RemotePowerShellEnabled" setting enabled.


To validate this open the Exchange Management Shell and run the Get-User cmdlet replacing the service account name as required.

(Get-User XiaConfigurationService).RemotePowerShellEnabled




Resolution

To set the "RemotePowerShellEnabled" setting open the Exchange Management Shell and use the Set-User cmdlet replacing the service account name as required.


Set-User XiaConfigurationService -RemotePowerShellEnabled $true