param([string]$Placa = '192.168.1.35', [int]$Porta = 8100, [switch]$SemAbrir) $ErrorActionPreference = 'Stop' $url = "http://${Placa}:$Porta" try { $health = Invoke-RestMethod "$url/app/health" -TimeoutSec 5 if ($health.projeto -ne 'carinha-pc') { throw 'Servidor inesperado' } } catch { throw "Orange Pi indisponível em $url. Confira alimentação, rede e o serviço carinha-pc. Nenhum servidor será iniciado no PC." } Write-Host "Painel Carinha $($health.versao): $url/" if (-not $SemAbrir) { Start-Process "$url/" }