Use curl.exe for TacticalRMM download to fix TLS failure
WebClient uses the old .NET TLS stack which fails to negotiate with agents.tacticalrmm.com. curl.exe (built into Win10/11/Server2019+) uses the OS TLS stack and handles redirects reliably. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
3d0a0d1692
commit
104a4219ab
@@ -177,7 +177,8 @@ If (Get-Service $serviceName -ErrorAction SilentlyContinue) {
|
||||
|
||||
Try {
|
||||
Write-Host "Downloading TacticalRMM agent..."
|
||||
(New-Object System.Net.WebClient).DownloadFile($downloadlink, "$OutPath\$output")
|
||||
& curl.exe -L -s -o "$OutPath\$output" $downloadlink
|
||||
if ($LASTEXITCODE -ne 0) { throw "curl download failed with exit code $LASTEXITCODE" }
|
||||
Write-Host "Download complete."
|
||||
Start-Process -FilePath "$OutPath\$output" -ArgumentList '/VERYSILENT /SUPPRESSMSGBOXES' -Wait
|
||||
Write-Host "Extracting..."
|
||||
|
||||
Reference in New Issue
Block a user