change certificate and securiy parameters

This commit is contained in:
2020-05-24 15:28:49 -04:00
parent 2d5ac33524
commit f7a4f6eaff
+4 -1
View File
@@ -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 }