Fix silent failure on TacticalRMM download
Add -ErrorAction Stop so Invoke-WebRequest throws on failure instead of silently continuing, and -UseBasicParsing to avoid IE engine dependency. Add progress output so it's clear the download is running. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
eb1fecb886
commit
3ff00aca6d
1 file changed
+3
-1
@@ -176,7 +176,9 @@ If (Get-Service $serviceName -ErrorAction SilentlyContinue) {
|
||||
}
|
||||
|
||||
Try {
|
||||
Invoke-WebRequest -Uri $downloadlink -OutFile "$OutPath\$output"
|
||||
Write-Host "Downloading TacticalRMM agent..."
|
||||
Invoke-WebRequest -Uri $downloadlink -OutFile "$OutPath\$output" -UseBasicParsing -ErrorAction Stop
|
||||
Write-Host "Download complete."
|
||||
Start-Process -FilePath "$OutPath\$output" -ArgumentList '/VERYSILENT /SUPPRESSMSGBOXES' -Wait
|
||||
Write-Host "Extracting..."
|
||||
Start-Sleep -s 5
|
||||
|
||||
Reference in new issue
Block a user