This commit is contained in:
2020-05-22 16:20:37 -04:00
parent 9ad9f129f3
commit 3d6b8700bd
+6 -3
View File
@@ -30,13 +30,16 @@ If ( $CUSTOMER_ID )
}
## Download the agent installer
Try { (New-Object System.Net.WebClient).DownloadFile($AGENT_URL, $AGENT_INSTALLER) }
Catch { Write-Output "There was an error downloading the agent installer!"; Exit }
Try
{
[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}
(New-Object System.Net.WebClient).DownloadFile($AGENT_URL, $AGENT_INSTALLER)
}
Catch { Write-Output "There was an error downloading the agent installer!" }
## Install the agent
Try { Start-Process $AGENT_INSTALLER -ArgumentList '/quiet /passive' -Wait }
Catch { Write-Output "There was an error installing the agent!" }
New-Item -Path $Env:SYSTEMDRIVE -Name "ready-for-install" -ItemType "file" -Value ""
## Remove the agent installer
If ( Test-Path $AGENT_INSTALLER )