diff --git a/playbook/shopfloor-setup/Shopfloor/lib/Monitor-IntuneProgress.ps1 b/playbook/shopfloor-setup/Shopfloor/lib/Monitor-IntuneProgress.ps1 index d00542c..fae2450 100644 --- a/playbook/shopfloor-setup/Shopfloor/lib/Monitor-IntuneProgress.ps1 +++ b/playbook/shopfloor-setup/Shopfloor/lib/Monitor-IntuneProgress.ps1 @@ -1312,7 +1312,15 @@ try { $nextRetrigger = $lastSync.AddMinutes($currentInterval) } - Start-Sleep -Seconds $PollSecs + # Tight poll while DeviceId still missing - it may take a few + # minutes after PPKG for dsregcmd to return a DeviceId, and we + # need to catch it ASAP to push idx=7 before the LAPS reboot. + # Once captured + reported, fall back to the normal cadence. + if (-not $script:cache.DeviceIdReported) { + Start-Sleep -Seconds 5 + } else { + Start-Sleep -Seconds $PollSecs + } } } catch {