Close retired Windows offers before start and verify policy-preserving updater support

This commit is contained in:
2026-11-18 12:11:15 +01:00
parent 0f70d8d8f5
commit fb07e4b548
6 changed files with 59 additions and 14 deletions
+4
View File
@@ -152,6 +152,10 @@ function Install-ScriptHelper {
$supported = & $binary --managed-script-helper-version
if ($LASTEXITCODE -ne 0 -or $supported -cne 'managed-script-helper/1') { throw 'Update the agent pair and stable updater before enabling administrator scripts.' }
}
$preservesPolicy = & $worker --managed-script-policy-version
if ($LASTEXITCODE -ne 0 -or $preservesPolicy -cne 'release-preserves-script-policy/1') {
throw 'Administrator scripts require the stable updater that preserves the local policy during release switches and rollbacks.'
}
$id = [IO.File]::ReadAllText($identity) | ConvertFrom-Json
$policy = [IO.File]::ReadAllText($timePath) | ConvertFrom-Json
if ($policy.tenant_id -cne $installed.tenant_id -or $policy.job_signing_public_key_hex -cnotmatch '^[0-9a-f]{64}$') {