System.Exception − New-ExoPSSession PowerShell Error in Netwrix Access Analyzer
Symptom
The following error is prompted when running an Exchange Online job in Netwrix Access Analyzer:
PowerShell error: System.Exception: New-ExoPSSession:
Connection to the remote server %server% failed with the following error message:
For more information, see the about_Remote_Troubleshooting Help topic.
Causes
- The ExchangeOnlineManagement PowerShell module is outdated.
- The PowerShellGet PowerShell module is outdated.
Resolutions
-
Run the following command in elevated PowerShell to update the ExchangeOnlineManagement module:
Update-Module -Name "ExchangeOnlineManagement"If the error
Update-Module : Module 'ExchangeOnlineManagement' was not installed by using Install-Moduleis prompted, refer to the following command to install the module:Install-Module -Name ExchangeOnlineManagement -RequiredVersion 3.3.0 -ForceFollow the instructions to complete the update.
-
Run the following command in elevated PowerShell to update the PowerShellGet module:
Update-Module -Name "PowerShellGet"If the error
Update-Module : Module 'PowerShellGet' was not installed by using Install-Moduleis prompted, refer to the following command to install the module:Install-Module -Name PowerShellGet -RequiredVersion 2.2.5 -ForceFollow the instructions to complete the update.