update
This commit is contained in:
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user