Powershell failing over HTTPS to Exchange 2019

JaseL 116 Reputation points
2021-03-19T12:52:44.463+00:00

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

Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,326 questions
0 comments No comments
{count} votes

Accepted answer
  1. Eric Yin-MSFT 4,386 Reputation points
    2021-03-22T02:43:41.367+00:00

    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.


0 additional answers

Sort by: Most helpful