diff --git a/playbook/shopfloor-setup/Shopfloor/lib/Monitor-IntuneProgress.ps1 b/playbook/shopfloor-setup/Shopfloor/lib/Monitor-IntuneProgress.ps1 index 31d57c3..d00542c 100644 --- a/playbook/shopfloor-setup/Shopfloor/lib/Monitor-IntuneProgress.ps1 +++ b/playbook/shopfloor-setup/Shopfloor/lib/Monitor-IntuneProgress.ps1 @@ -346,10 +346,15 @@ function Get-Phase1 { } } } - if ($phase1Essential -and $script:cache.DeviceId -and -not $script:cache.DeviceIdReported) { + # idx=7 push fires AS SOON AS DeviceId is captured. We want the QR + # to render on the PXE dashboard BEFORE the Intune-driven LAPS-prompt + # reboot lands (~1 min after GE Report IP posts its log). Phase 1 + # essentials, SCEP cert delivery, and AESFMA connection all take + # longer than DeviceId capture, so don't gate on any of those. + if ($script:cache.DeviceId -and -not $script:cache.DeviceIdReported) { if (Get-Command Send-PxeStatus -ErrorAction SilentlyContinue) { try { - Send-PxeStatus -Stage 'Monitor-IntuneProgress: Intune registration complete' ` + Send-PxeStatus -Stage 'Monitor-IntuneProgress: Intune Device ID captured' ` -StageIndex 7 -StageTotal 8 ` -IntuneDeviceId $script:cache.DeviceId -ErrorAction Stop $script:cache.DeviceIdReported = $true