Multiple DSC configs not working so well

We have a computer imaging process and part of this process lays down the “baseline” configs via a start-dscconfiguration cmdlet. Just after, we determine whether the computer is a desktop or laptop. If the computer is a laptop, we lay down our vpn client via another dsc configuration.

Not all the time, but often, the laptop dsc script fails. When it fails, we reboot the machine and attempt again until we hit 6 reboots. At six reboots, we let the machine stay there and a tech can go figure out what is wrong. Something about the time it takes for the tech to log in and look at the problem seems to allow something to clear and the same start-dscconfiguration cmdlet works with the laptop configuration.

Is there anything I could check before running the start-dscconfguration cmdlet for the laptop configuration to ensure that it is ready to process another configuration? I’m looking for any and all relevant pointers that I can go investigate. Just figured I would see if anyone has seen similar things before.



What is the error you are getting ? and When say allow something to clear , What is that something ?

My logs are simply stating that after running Start-DSCconfiguration, the computer was still not in the desired state, but it doesn’t capture the actual error output from that cmdlet.

Perhaps that is a good place to start. These dsc scripts run as the local system unattended and write logs to a share. What is a good way to capture relevant output from the output of start-dscconfiguration?

As for the “something” comment I made initially. I was just stating that after leaving the machine powered on without rebooting for 10 or 15 minutes, “something” changes on the system and Start-DSCConfiguration actually gets the machine into the desired state. I am unsure of what that something is that is blocking DSC from working at that point in time. Thoughts on where to look?

You could probably check the DSC event logs.
Operational Logs from Application and Services Logs -> Microsoft -> Windows -> Desired State Configuration

Our query is related to the same context.From ARM template tried to join the servers to domain and then install msb patches via custom script. Servers are getting joined to domain but the patches are not getting applied. Could you please help.