diff --git a/packer/templates/windows_2008_r2.json b/packer/templates/windows_2008_r2.json index f3814c2..27dffbc 100644 --- a/packer/templates/windows_2008_r2.json +++ b/packer/templates/windows_2008_r2.json @@ -185,7 +185,7 @@ { "type": "powershell", "inline": [ - "$env:chocolateyVersion = '0.10.8'; iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" + "$env:chocolateyVersion = '0.10.8'; [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" ], "pause_before": "60s" }, diff --git a/scripts/installs/install_chocolatey.ps1 b/scripts/installs/install_chocolatey.ps1 index c726122..5065bda 100644 --- a/scripts/installs/install_chocolatey.ps1 +++ b/scripts/installs/install_chocolatey.ps1 @@ -1,5 +1,6 @@ $ChocoInstallPath = "$env:SystemDrive\ProgramData\Chocolatey\bin" if (!(Test-Path $ChocoInstallPath)) { + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')) } \ No newline at end of file