@echo off REM Repara o SSH pelo tunel do painel SwitchDesk numa maquina ja instalada (servidores e controladores de dominio). REM Baixa o pacote do painel, CONFERE o SHA-256 e so entao executa. Precisa de administrador. net session >nul 2>&1 || (powershell -NoProfile -Command "Start-Process -FilePath '%~f0' -Verb RunAs" & exit /b) echo Reparo do SSH pelo painel SwitchDesk powershell -NoProfile -ExecutionPolicy Bypass -Command "$ErrorActionPreference='Stop'; [Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::Tls12; $d=Join-Path $env:TEMP ('reparar-ssh-'+[Guid]::NewGuid().ToString('N')); New-Item -ItemType Directory $d | Out-Null; $z=Join-Path $d 'reparar-ssh.zip'; Invoke-WebRequest -UseBasicParsing 'https://rustdesk.sistempostos.com/reparar-ssh.zip' -OutFile $z; if ((Get-FileHash $z -Algorithm SHA256).Hash -ne '5F8EB9F2188059AF4C7315A2C0E08E4833E6F2BF0FD3D68ACC9B8B4DA21B9FDC') { throw 'Pacote de reparo com hash diferente do esperado: NAO executado.' }; Expand-Archive $z -DestinationPath $d; & (Join-Path $d 'reparar-ssh.ps1'); exit $LASTEXITCODE" echo. pause