Restructured Agent Deployment Code

This commit is contained in:
2025-09-04 05:11:12 -06:00
parent 772a9c31d0
commit b9fe9b0965
3 changed files with 71 additions and 36 deletions

View File

@@ -0,0 +1,11 @@
param(
[string]$SupervisorTaskName = 'Borealis Agent - Supervisor'
)
$ErrorActionPreference = 'SilentlyContinue'
$task = Get-ScheduledTask -TaskName $SupervisorTaskName -ErrorAction SilentlyContinue
if (-not $task) { exit }
$st = $task.State
if ($st -eq 'Disabled') { Enable-ScheduledTask -TaskName $SupervisorTaskName | Out-Null }
if ($st -ne 'Running') { Start-ScheduledTask -TaskName $SupervisorTaskName | Out-Null }