Connecting to Remote Server outlook.office365.com Failed

Certainly, You can resolve New-ExoPSSession : Connecting to remote server outlook.office365.com failed error while updating old EXO module. You may need to update exchange online PowerShell V3 module (abbreviated as the EXO V3 module) to resolve this error.

Connecting to Remote Server outlook.office365.com Failed

Connecting to Remote Server outlook.office365.com Failed

Specifically, “New-ExoPSSession : Connecting to remote server outlook.office365.com failed,” suggests that there is an issue when attempting to establish a remote session using the “New-ExoPSSession” command. This command is typically used to create a remote PowerShell session to manage Exchange Online (Office 365) using the Exchange Online PowerShell module. Meanwhile, you can follow these troubleshooting steps to resolve this issue:

1. Import Exchange Online Module

Firstly, you must use Import-Module before using Connect-ExchangeOnline PowerShell command.

Import-Module ExchangeOnlineManagement

2. Run as Administration

Secondly, You may need to launch PowerShell as an administrator before running the command. This might help in cases where the command requires elevated permissions.

3. Check Exchange Online Status:

Firstly, you can check if there are any ongoing issues with Exchange Online or Office 365. Subsequently, You can status updates on service health dashboard for office 365, admin dashboard.

4. Exchange Online PowerShell Module Installation

Indeed, You need to confirm that Exchange Online PowerShell module is installed on your system. If you don’t have the new version of the module installed, you can use the PowerShell Install-Module command to download and install it from the PowerShell Gallery. Of course, You can install it using the following PowerShell command:

Install-Module -Name ExchangeOnlineManagement

5. Update Exchange Online PowerShell Module

Fourth, If you already have an older version of the module installed, you can update it. Most importantly, use the Find-Module command to check if there’s a new version available before updating:

Find-Module -Name ExchangeOnlineManagement -AllVersions

Now, if you find any updates or want to update exchange online PowerShell module, you can use the Update-Module command as below.

Update-Module -Name ExchangeOnlineManagement

6. Uninstall Previous Versions

Additionally, If you are unable to connect your exchange online with all above troubleshooting methods. Then, you can uninstall previous versions of exchange online PowerShell module. Simply, run Uninstall-Module command to uninstall exchange online PowerShell module.

Uninstall-Module -Name ExchangeOnlineManagement -AllVersions -Force

Now, This Uninstall-Module command will uninstall -Allversions of ExchangeOnlineManagement modules. Now, You need to install again the latest exchange online PowerShell module using the command below.

Install-Module -Name ExchangeOnlineManagement

Finally, You can again use the command below before using the Connect-ExchangeOnline PowerShell command.

Import-Module ExchangeOnlineManagement

Hopefully, You can connect exchange online using PowerShell with above troubleshooting otherwise, there are few more things to consider.

  1. Credential Issues: Firstly, you should ensure that you’re using the correct credentials (username and password) to connect to your Office 365 account. Also, If your account has multi-factor authentication enabled, you might need to provide an app password instead of your regular password.
  2. Roles Permissions: Secondly, you may need to confirm that you have appropriate permissions and roles to connect Exchange Online using PowerShell.
  3. Check Your Internet: Ensure that your internet connection is stable and working properly. Further, Check if there are any firewall or proxy settings that might be blocking the connection to “outlook.office365.com.”

Consequently, you can connect exchange online with these troubleshooting steps.

Exchange Online Tutorial

Share

You may also like...