question

JaseL-9286 avatar image
0 Votes"
JaseL-9286 asked ·

Powershell failing over HTTPS to Exchange 2019

I have an application that sends Powershell commands to Exchange 2016 over HTTPS. I have set up a new Exchange 2019 server, and Powershell from the same application to the Exchange 2019 server is failing with:

New-PSession: Connecting to remote server myserver.domain.com 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.

I compared the Powershell virtual directories on each server, and confirmed that they are configured the same. I verified that the PowerShell execution policy is set to RemoteSigned on both servers. The new server has a valid SSL certificate. Does anyone have any ideas on what I'm missing?

Thank you

office-exchange-server-connectivityoffice-exchange-server-itprooffice-exchange-server-deployment
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

EricYin-MSFT avatar image
0 Votes"
EricYin-MSFT answered ·

Hi,
I'm not sure how your application works but I found a thread may help:https://social.technet.microsoft.com/Forums/en-US/4b3682ec-4f85-419c-8b8e-aae908547589/unable-to-connect-exchange-2010-using-remote-powershell-if-tls-10-and-11-is-disabled?forum=exchange2010

Exchange 2019 has only TLS 1.2 enabled, which might be the issue: With Exchange 2019, there is no choice: the server does not support TLS 1.1 and older versions. You cannot use old protocols for your own safety.
You can try IIS Crypto to manage your windows TLS settings: https://www.nartac.com/Products/IISCrypto/
Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
You can also check the IIS Manager about the powershell settings, is this ticked in your Exchange 2016 server?
80001-3.png



If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



3.png (50.1 KiB)
· 1 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you for that information. That may have been what was causing the issue. I actually solved the issue by moving the application from a Windows 2012 server to a Windows 2019 server. Once I moved the application, I immediately started getting this error though:

The WS-Management service cannot process the request. Operations involving multiple messages from the client are not supported.

I found this post:

https://social.technet.microsoft.com/Forums/en-US/ecacb4f2-9ad1-4b40-82f5-2d84e82fc516/the-wsmanagement-service-cannot-process-the-request?forum=Exch2019

Once I changed the service to run as an account that was a member of the local administrators group, instead of the local system account, as suggested in the article above, the application started working properly.

0 Votes 0 ·