param(
    [string]$InstallDirectory = (Split-Path -Path $PSScriptRoot -Parent),
    [string]$Duration = "2h"
)

Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
$agentExe = Join-Path $InstallDirectory "agent\IAUWP.Agent.exe"
if (-not (Test-Path -Path $agentExe)) { throw "Agent executable was not found at '$agentExe'." }
& $agentExe --supervision-pause $Duration
if ($LASTEXITCODE -ne 0) { throw "Supervision pause failed with exit code $LASTEXITCODE." }
