Forum Discussion

MAYousuf's avatar
MAYousuf
Copper Contributor
Jul 03, 2020

Error to connect EXO with PS

Hi,

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 https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
New-PSSession : [outlook.office365.com] Connecting to remote server outlook.office365.com 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
gTransportException
+ FullyQualifiedErrorId : -2144108477,PSSessionOpenFailed

3 Replies

    • MAYousuf's avatar
      MAYousuf
      Copper Contributor
      Thanks a lot. I have fixed the problem which was with my credential id. I had used another id to access there.
  • danni2709's avatar
    danni2709
    Copper Contributor

    MAYousuf 

     

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

     

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

     

    https://gallery.technet.microsoft.com/Office-365-and-Azure-e36eabeb

    https://gallery.technet.microsoft.com/Office-365-and-Azure-e36eabeb

Resources