PowerShell uses .Net settings for TLS, so check for that:
[Net.ServicePointManager]::SecurityProtocol
and if needed, update via:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi guy's
I am having a problem to connect to exchange online form PowerShell on a server 2012.
When try to connect get this error: Connecting to remote server outlook.office365.com failed The SSL connection cannot be established
I made sure that the TLS 1.1 and 1.2 are enabled and I can access the outlook.office365.com from IE browser but when try to access the Exchange online get this error.
Any suggestion?
Thanks
PowerShell uses .Net settings for TLS, so check for that:
[Net.ServicePointManager]::SecurityProtocol
and if needed, update via:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
@Vasil Michev , Thanks for your reply, I just check the registry HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\ and there I can see the
TLS 1.2\Clients and a registry key DisabledByDefault withy the value of 1 I set it to 0 but still unable to connect to the exchane online.
Do we need to add the server key and DisabledByDefault to 0? or that is noet needed?
Follow this article to set ExecutionPolicy as RemoteSigned, make sure basic enabled on your computer:
Set-ExecutionPolicy RemoteSigned
winrm get winrm/config/client/auth
About managing TLS, you could follow this blog.
You also need to make sure Exchange Online IP address could be accessed from your client.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
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.