(WinRM client cannot process the request) error when you connect to Exchange Online through remote Windows PowerShell
When you use remote Windows PowerShell to connect to Exchange Online in Microsoft Office 365, you receive the following error message:
[outlook.office365.com] Connecting to remote server failed with the following error message:
The WinRM client cannot process the request because the server name cannot be resolved. For more information, see the about_Remote_Troubleshooting Help topic.
+ CategoryInfo : OpenError:
+ FullyQualifiedErrorId : PSSessionOpenedFailed
This issue occurs in one of the following situations:
- A firewall blocks necessary traffic.
- The Windows Remote Management service isn't started.
- The proxy server doesn't work correctly.
Make sure that the firewall doesn't block necessary traffic.
Check whether the Windows Remote Management service is installed and has started:
Type services.msc in the Run dialog box, and then press Enter.
In the Services MMC, double-click Windows Remote Management.
Set the startup type to Manual, and then click OK.
Right-click the service, and then select Start.
Let the service start.
If the service was already started but it's not responding, you may have to click Restart.
Try to connect to Exchange Online again.
Check the proxy server setting
Open an elevated Command Prompt.
Run the following command to verify the current proxy configuration:
netsh winhttp show proxy
Take one of the following actions:
To reset the WinHTTP proxy, run the following command:
netsh winhttp reset proxy
To configure a new proxy server, run the following command:
netsh winhttp set proxy <proxy>:<port>
For example, run
netsh winhttp set proxy 10.0.0.6:8080.
You can also import the settings.
For more information about Microsoft 365 endpoints, see Microsoft 365 URLs and IP address ranges.
For more information about how to connect to Exchange Online by using remote PowerShell, go to Connect to Exchange Online using Remote PowerShell.
Still need help? Go to Microsoft Community.