diff --git a/playbook/shopfloor-setup/Shopfloor/Monitor-IntuneProgress.ps1 b/playbook/shopfloor-setup/Shopfloor/lib/Monitor-IntuneProgress.ps1 similarity index 100% rename from playbook/shopfloor-setup/Shopfloor/Monitor-IntuneProgress.ps1 rename to playbook/shopfloor-setup/Shopfloor/lib/Monitor-IntuneProgress.ps1 diff --git a/playbook/shopfloor-setup/Shopfloor/sync_intune.bat b/playbook/shopfloor-setup/Shopfloor/sync_intune.bat index 3c01bf8..869a54b 100644 --- a/playbook/shopfloor-setup/Shopfloor/sync_intune.bat +++ b/playbook/shopfloor-setup/Shopfloor/sync_intune.bat @@ -18,7 +18,12 @@ REM absolute path to find the monitor instead. setlocal title Intune Policy Sync -set "MONITOR=C:\Enrollment\shopfloor-setup\Shopfloor\Monitor-IntuneProgress.ps1" +REM Monitor lives under lib\ to keep it OUT of the dispatcher's baseline scan. +REM Run-ShopfloorSetup.ps1 does Get-ChildItem -Filter "*.ps1" on the Shopfloor\ +REM dir (non-recursive) and runs every script it finds - if Monitor-IntuneProgress +REM lived there, the dispatcher would invoke it as a baseline script and hang the +REM whole shopfloor setup forever (it's an infinite poll loop, never returns). +set "MONITOR=C:\Enrollment\shopfloor-setup\Shopfloor\lib\Monitor-IntuneProgress.ps1" REM Self-elevate to administrator net session >nul 2>&1