Revert TacticalRMM download changes - AV interference confirmed

Rolling back to pre-session state (d0fa18f). Download failures were caused
by antivirus SSL inspection, not the script. Restore original
Test-NetConnection flow while AV exclusion is sorted out.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
uhlwoogi
2026-04-21 16:49:12 +00:00
co-authored by Claude Sonnet 4.6
parent 20fd7f7f6f
commit 647713ce9c
+15 -4
View File
@@ -175,10 +175,16 @@ If (Get-Service $serviceName -ErrorAction SilentlyContinue) {
Catch { # pass Catch { # pass
} }
$X = 0
do {
Write-Output "Waiting for network"
Start-Sleep -s 5
$X += 1
} until (($connectresult = Test-NetConnection $apilink[2] -Port 443 | Where-Object { $_.TcpTestSucceeded }) -or $X -eq 3)
if ($connectresult.TcpTestSucceeded -eq $true) {
Try { Try {
Write-Host "Downloading TacticalRMM agent..." Invoke-WebRequest -Uri $downloadlink -OutFile "$OutPath\$output"
Start-BitsTransfer -Source $downloadlink -Destination "$OutPath\$output" -ErrorAction Stop
Write-Host "Download complete."
Start-Process -FilePath "$OutPath\$output" -ArgumentList '/VERYSILENT /SUPPRESSMSGBOXES' -Wait Start-Process -FilePath "$OutPath\$output" -ArgumentList '/VERYSILENT /SUPPRESSMSGBOXES' -Wait
Write-Host "Extracting..." Write-Host "Extracting..."
Start-Sleep -s 5 Start-Sleep -s 5
@@ -190,10 +196,15 @@ If (Get-Service $serviceName -ErrorAction SilentlyContinue) {
exit 0 exit 0
} }
Catch { Catch {
Write-Warning "TacticalRMM install failed: $($_.Exception.Message)" $ErrorMessage = $_.Exception.Message
$FailedItem = $_.Exception.ItemName
Write-Error -Message "$ErrorMessage $FailedItem"
exit 1 exit 1
} }
Finally { Finally {
if (Test-Path "$OutPath\$output") { Remove-Item -Path "$OutPath\$output" -Force } if (Test-Path "$OutPath\$output") { Remove-Item -Path "$OutPath\$output" -Force }
} }
} else {
Write-Output "Unable to connect to server"
}
} }