Jul 03 2020
04:16 AM
- last edited on
Feb 07 2023
07:58 PM
by
TechCommunityAP
Jul 03 2020
04:16 AM
- last edited on
Feb 07 2023
07:58 PM
by
TechCommunityAP
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
Jul 03 2020 04:29 AM
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
https://gallery.technet.microsoft.com/Office-365-and-Azure-e36eabeb
Jul 03 2020 10:57 AM
Hi,
Are you aware that Microsoft has a new Exchange Module for powershell
ExchangeOnlineManagement.
https://docs.microsoft.com/en-us/powershell/exchange/exchange-online-powershell-v2?view=exchange-ps
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.
Jul 05 2020 08:39 AM