Here is a link with detailed information on how to troubleshoot this issue:
"Connecting to the remote server failed with the following error message" error when you start the Exchange Management Shell or the Exchange Management Console
The error message in your post is the same as the Error message 7.
Please follow the resolution in the link to install and run Exchange Management Troubleshooter.
If the response 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.