Bit of a strange one here, we’re currently moving our development environment deployment from start-up script installation to DSC in a pull configuration on Server 2012 R2. We’ve got everything working in-terms of the configuration script and the pull server etc however we’re trying to ensure that a machine is obviously “not ready” to login to until the DSC is finished applying.
Our original solution to this was to have a synchronous startup script that checks for the existance of “C:\Windows\System32\Configuration\Pending.mof” and while it’s there just sleep and check again in 5 seconds. This almost works, except that the startup script executing appears to interfere with DSC’s ability to reboot when it needs to. So, if I can change the loop to break out if DSC isn’t applying then it’ll presumably restart itself appropriately? This poses the question, how do I tell if it’s currently applying stuff?!