Learning and Sharing
  • Home
  • Blog
  • Linux
  • macOS
  • Virtualization
    • VMware
    • VirtualBox
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server
  • Series
    • Symantec
    • Intune
    • Microsoft Azure
    • Powershell
    • VirtualBox
    • VMware
    • PowerShell Learning
    • Microsoft Graph
  • More
    • Auto Installation
    • AEC Installation
  • Contact
No Result
View All Result
  • Home
  • Blog
  • Linux
  • macOS
  • Virtualization
    • VMware
    • VirtualBox
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server
  • Series
    • Symantec
    • Intune
    • Microsoft Azure
    • Powershell
    • VirtualBox
    • VMware
    • PowerShell Learning
    • Microsoft Graph
  • More
    • Auto Installation
    • AEC Installation
  • Contact
No Result
View All Result
No Result
View All Result

The Request was Aborted: Could not Create SSL/TLS Secure Channel

August 3, 2023
in Blog
0
ADVERTISEMENT

Table of Contents

Could not Create SSL/TLS Secure Channel

irm https://community.chocolatey.org/install.ps1 | iex

In some cases, you got the following error when connecting to an HTTPS server using WebRequest or PowerShell:

irm : The request was aborted: Could not create SSL/TLS secure channel.
At line:1 char:1
+ irm https://community.chocolatey.org/install.ps1 | iex
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebExc
eption
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

This exception message typically indicates that a secure channel could not be created due to the client application failing to specify a cryptographic protocol that is supported by the server.

As time goes on, this issue is more likely to crop up, as an increasing number of servers remove support for the older TLS 1.0 and TLS 1.1 protocols. At the time of writing, TLS 1.2 and TLS 1.3 are the current standards for secure network communications.

By default, Windows Server 2012 enables SSL3 and TLS1. You can check by the following command:

PS C:\> [Net.ServicePointManager]::SecurityProtocol
Ssl3, Tls

You can get the supported protocols on Windows Server 2012. Then you can see, TLS1.2 is supported but it’s not enabled by default.

PS C:\> [enum]::GetNames([System.Net.SecurityProtocolType])
SystemDefault
Ssl3
Tls
Tls11
Tls12

Enable TLS 1.2 on Server 2012 temporary

To solve the error, use the SecurityProtocol property to specify that all protocols are supported.

1️⃣ To fix it, make sure you have download then install .NET Framework 4.x or higher at  https://dotnet.microsoft.com/en-us/download/dotnet-framework then restart your server.

2️⃣ Use the SecurityProtocol property to specify that all protocols are supported before you run the main command.

[System.Net.ServicePointManager]::SecurityProtocol = 'TLS12'
irm https://community.chocolatey.org/install.ps1 | iex

But, with this method, the settings only available for the current session. If you close then reopen a new PowerShell window, the setting would be reverted to default. Let move forward to change it permanently.

Enable TLS 1.2 on Server 2012 permanently

1️⃣ Make sure you have installed .NET Framework 4.x or higher.

2️⃣ Open PowerShell as administrator then run the below command:

Set-ItemProperty `
    -Path 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\.NetFramework\v4.0.30319' `
    -Name 'SchUseStrongCrypto' -Value '1' -Type DWord

Set-ItemProperty `
    -Path 'HKLM:\SOFTWARE\Microsoft\.NetFramework\v4.0.30319' `
    -Name 'SchUseStrongCrypto' -Value '1' -Type DWord

3️⃣ To verify it works, let close and reopen a new PowerShell window the execute the following command:

PS C:\> [Net.ServicePointManager]::SecurityProtocol
Tls, Tls11, Tls12
5/5 - (1 vote)
Previous Post

How to Fix Secure Boot Option Grayed out in BIOS in HP Laptop

Next Post

How To Fix UltraISO Error 5 Writing The Device

Related Posts

Running Hyper-V and VMware Workstation on The Same Machine

August 15, 2024

How to Uninstall All Autodesk Products At Once Silently

July 29, 2024
Ftr5

How to Uninstall the Autodesk Genuine Service on Windows

July 29, 2024
Ftr19

How to Fix Windows Cannot Read the ProductKey From the Unattend Answer File in VirtualBox

July 26, 2024
Ftr25

How to Update Windows Terminal in Windows 10/11

July 26, 2024

How to Disable The Beep Sound in WSL Terminal on Windows

July 26, 2024

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • How To Turn On uBlock Origin Extension in Chrome (2025)
  • Images Hidden Due To Mature Content Settings In CivitAI
  • Azure OpenAI vs Azure AI Hub, How to Choose the Right One for Your Needs

Categories

Stay in Touch

Discord Server

Join the Discord server with the site members for all questions and discussions.

Telegram Community

Jump in Telegram server. Ask questions and discuss everything with the site members.

Youtube Channel

Watch more videos, learning and sharing with Leo ❤❤❤. Sharing to be better.

Newsletter

Join the movement and receive our weekly Tech related newsletter. It’s Free.

General

Microsoft Windows

Microsoft Office

VMware

VirtualBox

Technology

PowerShell

Microsoft 365

Microsoft Teams

Email Servers

Copyright 2025 © All rights Reserved. Design by Leo with ❤

No Result
View All Result
  • Home
  • Linux
  • Intune
  • macOS
  • VMware
  • VirtualBox
  • Powershell
  • Windows 10
  • Windows 11
  • Microsoft 365
  • Microsoft Azure
  • Microsoft Office
  • Active Directory

No Result
View All Result
  • Home
  • Linux
  • Intune
  • macOS
  • VMware
  • VirtualBox
  • Powershell
  • Windows 10
  • Windows 11
  • Microsoft 365
  • Microsoft Azure
  • Microsoft Office
  • Active Directory