Error to connect EXO with PS

New Contributor


Could anybody please help me. Why this message is showing while trying to connect EXO using PS? 


PS C:\Users> $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $UserCredential -Authentication Basic -AllowRedirection
New-PSSession : [] Connecting to remote server failed with the following
error message : 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
+ FullyQualifiedErrorId : -2144108477,PSSessionOpenFailed

3 Replies



Are you running it as a script from ISE, or just from powershell ?


Have you tried running another script to see if that fails ?


Here's one, if you don't have any


Are you aware that Microsoft has a new  Exchange Module for powershell
You don't have to use the $session command line

It has new commands which are improving  the performance.
You probably have to update your script.

Maybe this helps.

Thanks a lot. I have fixed the problem which was with my credential id. I had used another id to access there.