GE-Enforce: write machineNumber + bump enforcerVersion to 2.5

Adds machineNumber field to status.json (read from C:\Enrollment\machine-number.txt).
Bumps enforcerVersion to '2.5' so check-fleet-convergence.txt's column
flips when fleet picks up the self-update. Pairs with the Install-FromManifest
v2.5 (WaitTimeoutSec) so both bumps land together.

Convergence-check txt updated to display the new MN column.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
cproudlock
2026-05-04 16:55:29 -04:00
parent feae2d6929
commit 9b2ee11840

View File

@@ -280,12 +280,20 @@ try {
} }
} }
$machineNumber = ''
try {
if (Test-Path 'C:\Enrollment\machine-number.txt') {
$machineNumber = (Get-Content 'C:\Enrollment\machine-number.txt' -First 1 -ErrorAction SilentlyContinue).Trim()
}
} catch {}
$status = [ordered]@{ $status = [ordered]@{
hostname = $hostname hostname = $hostname
machineNumber = $machineNumber
lastCheckIn = (Get-Date).ToUniversalTime().ToString('o') lastCheckIn = (Get-Date).ToUniversalTime().ToString('o')
pcType = $pcType pcType = $pcType
pcSubType = $pcSubType pcSubType = $pcSubType
enforcerVersion = '2.4' enforcerVersion = '2.5'
shopfloorShareRoot = $shopfloorShareRoot shopfloorShareRoot = $shopfloorShareRoot
scopesProcessed = $scopeResults scopesProcessed = $scopeResults
installedVersions = $installedVersions installedVersions = $installedVersions