Run winrm /quickconfig and make sure your firewall is not blocking connections to Exchange Online (here's the list of IPs/URLs you need to allow: https://learn.microsoft.com/en-us/microsoft-365/enterprise/urls-and-ip-address-ranges?view=o365-worldwide#exchange-online)
Connecting to remote server outlook.office365.com failed with the following error message
Hi All,
I have installed the Exchange Online Management V2 2.0.3 version on Windows server 2016. When i tries Connect-Exchange Online gets the prompt for credential and MFA. post that getting following error.
Microsoft Exchange Online Management
2 answers
Sort by: Most helpful
-
Vasil Michev 119.2K Reputation points MVP Volunteer Moderator
2021-05-25T19:43:01.14+00:00 -
KyleXu-MSFT 26,396 Reputation points
2021-05-26T09:07:46.32+00:00 Try to ping "outlook.office365.com" first, make sure you could access this address from your computer.
Then try to update the version of Exchange Online Management:
Update-Module -Name ExchangeOnlineManagement
After that, connect to Exchange online again. Make sure your tenant is worldwide version, if you are using other version of Office 365, you need to connect to it with other command:
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.