Receiving "The SSL connection could not be established, see inner exception." on all Azure PowerShell cmdlets.

Jason Yoder 0 Reputation points
2024-07-19T22:00:47.9533333+00:00

I am receiving the following error, regardless of the Azure PowerShell cmdlet that I am using.

Again, it is for all azure cmdlets that I am receiving this SSL error message. My TLS is set to 1.2.

About 1 out of every 3 Azure PowerShell cmdlets return this error. The rest of the time the cmdlet completes successfully.

Thank you in advance,

Jason

Get-AzResourceProvider:

Line |

3 | … rceTypes = (Get-AzResourceProvider -ProviderNamespace $ResourceProvid …

 |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 | The SSL connection could not be established, see inner exception.
```PS C:\Users\JASON\Documents\PowerShell\Modules\AIImages> $error[0]| Select *

PSMessageDetails      : 

Exception             : 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..

                 ---> System.Net.Sockets.SocketException (10054): An existing connection was forcibly closed by the remote host.

                   --- End of inner exception stack trace ---

                   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)

                   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,438 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Rich Matheisen 46,321 Reputation points
    2024-07-20T02:27:52.86+00:00
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.