Choco install Powershell failure

Support forums for the Habitat Automate plugin
Post Reply
JvdMaat
Posts: 27
Joined: Wed Feb 21, 2018 1:31 am

Choco install Powershell failure

Post by JvdMaat »

When this command runs:
cmd.exe!!! /c "@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object system.net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"

I get this back on half my systems:
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


Googling the error, they talk about it being a TLS issue where the website doesn't support a lower TLS version. However why does it work on some systems? (Unless chocolatey.com has multiple servers that are configured differently, and it just depends on which IP address they get back?)
Even running the command from ScreenConnect command prompt, I get the same error, so it's consistent.
Is there a PS way to specify TLS 1.2 in this download? (Again, Google says to include this, but not sure on syntax on how/where: [Net.ServicePointManager]::SecurityProtocol = "tls12")

User avatar
Cubert
Posts: 1483
Joined: Tue Dec 29, 2015 7:57 pm
Contact:

Re: Choco install Powershell failure

Post by Cubert »

Hmmm...

Not sure, let do a little testing to see if I can force that.

Post Reply