diff --git a/playbook/shopfloor-setup/run-enrollment.ps1 b/playbook/shopfloor-setup/run-enrollment.ps1 index b1495f8..de4c1d8 100755 --- a/playbook/shopfloor-setup/run-enrollment.ps1 +++ b/playbook/shopfloor-setup/run-enrollment.ps1 @@ -27,11 +27,22 @@ if (-not $ppkgFile) { } Log "Package: $($ppkgFile.Name)" -# --- Set computer name to E --- -$serial = (Get-CimInstance Win32_BIOS).SerialNumber -$newName = "E$serial" -Log "Setting computer name to $newName" -Rename-Computer -NewName $newName -Force -ErrorAction SilentlyContinue +# --- Computer name: the PPKG owns it, do NOT rename here --- +# The package declares F%SERIAL%, so a bay is +# meant to come up as F. This script used to run +# Rename-Computer -NewName "E$serial" +# which is a second pending rename racing the package's. Observed on 579C144 +# 2026-08-06: +# +# 13:31:55 run-enrollment Rename-Computer -> E579C144 (pending) +# 13:32:17 ppkg Reboot/DeviceName -> F%SERIAL% (pending) +# "Reboot successfully scheduled. Device name set successfully." +# 13:36:45 run-enrollment runs AGAIN -> E579C144 (overwrites F) +# ~13:37 reboot, E579C144 wins +# +# Last writer wins at reboot, so the hardcoded E prefix silently beat the +# package's F. Nothing in this repo ever produced an F name; the convention only +# works if we leave naming to the package. # --- Install provisioning package --- # IMPORTANT: The PPKG must be installed BEFORE OOBEComplete is set. Bulk