Forum Discussion
jamelbouzidi
Apr 13, 2023Copper Contributor
Unable to Connect to EMS Server
Hello,
I am writing to report an issue that I am currently experiencing with my EMS setup. Specifically, I am unable to connect to one of two EMS servers, and I'm receiving this error message:
New-PSSession : [srvexc03.mydomain.local] Connecting to remote server srvexc03.mydomain.local failed with the following error message : For more information, see the about_Remote_Troubleshooting Help topic.
At line:1 char:1
+ New-PSSession -ConnectionURI "$connectionUri" -ConfigurationName Micr ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotingTransportException
+ FullyQualifiedErrorId : -2144108477,PSSessionOpenFailed
I am hoping that some of you may have experienced a similar issue or have some insights that could help me resolve this problem.
Thank you in advance for your assistance
6 Replies
Sort By
- Andres-BohrenSteel Contributor
Try to play with the following Parameters
$ServernameFQDN = "srvexc03.mydomain.local"#Connection URL can be HTTP or HTTPS. Is the$conURI = "https://$ServernameFQDN/PowerShell/"$conURI = "http://$ServernameFQDN/PowerShell/"#Authentication:#- Basic#- Credssp#- Digest#- Kerberos#- Negotiate#- NegotiateWithImplicitCredential#You can use SessionOption to skip the Certificate Checks$SessionOption = New-PsSessionOption -SkipCACheck -SkipCNCheck -SkipRevocationCheck#Connect using Kerberos$ExSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri $conURI -Authentication Kerberos -SessionOption $SessionOptionImport-PSSession -Session $ExSession -DisableNameChecking -AllowClobber | Out-Null
#Connect using Basic Auth$Cred = Get-Credential$ExSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri $conURI -Authentication Basic -Credential $Cred -SessionOption $SessionOptionImport-PSSession -Session $ExSession -DisableNameChecking -AllowClobber | Out-NullRegardsAndres- jamelbouzidiCopper Contributor
Thank you for your reply.
When I use https I get this error:
New-PSSession : [srvexc03.mydomain.local] Connecting to remote server srvexc03.mydomain.local failed with the following error message : The SSL connection cannot be established. Verify that the service on the remote host is properly configured to listen for HTTPS requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM service: "winrm quickconfig -transport:https". For more information, see the about_Remote_Troubleshooting Help topic. At line:6 char:14 + ... ExSession = New-PSSession -ConfigurationName Microsoft.Exchange -Conn ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotingTransportException + FullyQualifiedErrorId : -2144108102,PSSessionOpenFailed
and when I use http, I get this one:
New-PSSession : [srvexc03.mydomain.local] Connecting to remote server srvexc03.mydomain.local failed with the following error message : The WinRM client cannot process the request. It cannot determine the content type of the HTTP response from the destination computer. The content type is absent or invalid. For more information, see the about_Remote_Troubleshooting Help topic. At line:6 char:14 + ... ExSession = New-PSSession -ConfigurationName Microsoft.Exchange -Conn ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotingTransportException + FullyQualifiedErrorId : -2144108297,PSSessionOpenFailed Import-PSSession : Cannot validate argument on parameter 'Session'. The argument is null. Provide a valid value for the argument, and then try running the command again. At line:7 char:27
- Andres-BohrenSteel Contributor
Hi jamelbouzidi
Did you use the SessionOption to skip the Certificate Checks?
Check your Exchange Konfiguration
Get-PowerShellVirtualDirectory -Server srvexc03 | flRegards
Andres