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:
co-authored by
Claude Sonnet 4.6
parent
20fd7f7f6f
commit
647713ce9c
@@ -175,10 +175,16 @@ If (Get-Service $serviceName -ErrorAction SilentlyContinue) {
|
||||
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 {
|
||||
Write-Host "Downloading TacticalRMM agent..."
|
||||
Start-BitsTransfer -Source $downloadlink -Destination "$OutPath\$output" -ErrorAction Stop
|
||||
Write-Host "Download complete."
|
||||
Invoke-WebRequest -Uri $downloadlink -OutFile "$OutPath\$output"
|
||||
Start-Process -FilePath "$OutPath\$output" -ArgumentList '/VERYSILENT /SUPPRESSMSGBOXES' -Wait
|
||||
Write-Host "Extracting..."
|
||||
Start-Sleep -s 5
|
||||
@@ -190,10 +196,15 @@ If (Get-Service $serviceName -ErrorAction SilentlyContinue) {
|
||||
exit 0
|
||||
}
|
||||
Catch {
|
||||
Write-Warning "TacticalRMM install failed: $($_.Exception.Message)"
|
||||
$ErrorMessage = $_.Exception.Message
|
||||
$FailedItem = $_.Exception.ItemName
|
||||
Write-Error -Message "$ErrorMessage $FailedItem"
|
||||
exit 1
|
||||
}
|
||||
Finally {
|
||||
if (Test-Path "$OutPath\$output") { Remove-Item -Path "$OutPath\$output" -Force }
|
||||
}
|
||||
} else {
|
||||
Write-Output "Unable to connect to server"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user