ab53c96928
sc.exe query writes "The specified service does not exist" to stdout when the service is missing, so checking truthy on its output was useless — it always took the update branch and silently failed when piped to Out-Null. Switch to Get-Service which returns $null cleanly, and stop swallowing sc.exe output so missing-service / permission / account errors actually surface as PowerShell errors. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>