microsoft / powerbi-powershell

PowerShell community for Microsoft PowerBI. Here you will find resources and source for PowerShell modules targeting PowerBI.
MIT License
344 stars 119 forks source link

Connect-PowerBIServiceAccount PowerShell cmdlet throwing SSL/TLS error #238

Open bnm22 opened 4 years ago

bnm22 commented 4 years ago

We are running a PowerShell script using this cmdlet on a Windows 2012R2 server on PowerShell Desktop v5.1 and Core v.7.0.2 and consistently getting the following errors.

v.5.1 System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host

v.7.0.2 {System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..

We tried using this workaround in this post but no luck. Also, checked the machine TLS settings via IISCrypto and in the registry. This appears to recently start happening and after the June Windows update.

Any assistance is appreciated.

matt40k commented 4 years ago

Isn't Windows Server 2012 R2 end of life?

Did you try: https://docs.microsoft.com/en-us/mem/configmgr/core/plan-design/security/enable-tls-1-2-client

Also you rebooted after applying the reg keys?