From f7a4f6eaffa4ad969e550ebd55b57a9e60c816a1 Mon Sep 17 00:00:00 2001 From: dyoder Date: Sun, 24 May 2020 15:28:49 -0400 Subject: [PATCH] change certificate and securiy parameters --- Install-ManagementAgent.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Install-ManagementAgent.ps1 b/Install-ManagementAgent.ps1 index 4a73da1..6252e9d 100644 --- a/Install-ManagementAgent.ps1 +++ b/Install-ManagementAgent.ps1 @@ -29,8 +29,11 @@ If ( $CUSTOMER_ID ) Catch { Write-Output $_.Exception.Message } } - ## Download the agent installer + ## Setup security and certificate parameters to download from untrusted sources + [Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls" [System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true} + + ## Download the agent installer Try { (New-Object System.Net.WebClient).DownloadFile($AGENT_URL, $AGENT_INSTALLER) } Catch { Write-Output $_.Exception.Message ; Exit }