Exception calling "DownloadString" with "1" argument(s): "The request was aborted: Could not create SSL/TLS secure
channel."
At line:1 char:1
+ iex ((New-Object System.Net.WebClient).DownloadString('https://chocol ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : WebException
choco : The term 'choco' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:95
+ ... .DownloadString('https://chocolatey.org/install.ps1')); choco upgrade ...
+ ~~~~~
+ CategoryInfo : ObjectNotFound: (choco:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException*

- 4,013
- 15
- 58
- 94

- 17
- 2
-
Have you done this step (https://github.com/chocolatey/choco/wiki/Installation#install-with-powershellexe) when you installed choco? – eol Jun 28 '20 at 09:11
3 Answers
You are trying to install Chocolatey without TLS 1.2 enabled. See this blog post for more information on that.
The following is taken directly from that blog post:
While your operating system may support TLS 1.2 it's important to remember that it may have to be enabled. If you are working from PowerShell you can find out which protocols your system supports by running this code:
[Enum]::GetNames([Net.SecurityProtocolType]) -contains 'Tls12'
If the result is True then your system supports TLS 1.2. You can find out which protocols are being used by running:
[System.Net.ServicePointManager]::SecurityProtocol.HasFlag([Net.SecurityProtocolType]::Tls12)
If the result is True then TLS 1.2 is being used . However, you can add TLS 1.2 explicitly by using:
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12

- 683
- 3
- 9
The Powershell commands to enable TLS 1.2 given in Pauby's post are correct but there is an issue. The issue is TLS 1.2 gets enabled only for that session. To check this close powershell and open powershell again. Now check the TLS1.2 status. It will show 'False' though you set it to true. To make TLS 1.2 as default or for further sessions run the following in the Powershell.( These scripts are taken from https://johnlouros.com/blog/enabling-strong-cryptography-for-all-dot-net-applications )
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
This worked for me.

- 21
- 1
ode : The term 'node' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1
- node -v
-
+ CategoryInfo : ObjectNotFound: (node:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException