Can’t connect the Microsoft Exchange Online usong PowerShell

Situation: The client has migrated their Exchange to Microsoft 365. When trying to connect their Exchange online using PowerShell.

$UserCredential = Get-Credential command let them to login. However,

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://<ServerFQDN>/PowerShell/ -Authentication Kerberos -Credential $UserCredential

command doesn’t work with this message:

PS C:\Windows\system32> $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://abc.onmic
osoft.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
New-PSSession : [abc.onmicrosoft.com] Connecting to remote server abc.onmicrosoft.com 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.
At line:1 char:12
+ $Session = New-PSSession -ConfigurationName Microsoft.Exchange -Conne …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (System.Manageme….RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotin
gTransportException
+ FullyQualifiedErrorId : ComputerNotFound,PSSessionOpenFailed

Resolution: Install Microsoft Exchange Online PowerShell Module on your computer. Please refer to this post:

Published by

Bob Lin

Bob Lin, Chicagotech-MVP, MCSE & CNE Data recovery, Windows OS Recovery, Networking, and Computer Troubleshooting on http://www.ChicagoTech.net How to Install and Configure Windows, VMware, Virtualization and Cisco on http://www.HowToNetworking.com

Leave a Reply