LCM reconfiguration behavior?

Welcome Forums DSC (Desired State Configuration) LCM reconfiguration behavior?

This topic contains 2 replies, has 3 voices, and was last updated by

4 years, 2 months ago.

  • Author
  • #20631

    Points: 0
    Rank: Member

    If I was remotely executing a script to configure the LCM on a target server/machine that has ALREADY had its configuration set by the same script, would this reset the timer LCM uses to do its work?

    I want to schedule a task on my pull server that will do get-adcomputer and then repush the config to all the servers (this way it'll catch NEW servers and push the configs to the new servers.) I worry that doing this though will interfere with my existing servers LCM timer.

    Otherwise I'll have to devise a "get new computer" strategy hehe 🙂

  • #20638

    Points: 0
    Rank: Member

    If you call Start-DscConfiguration and push a new mof file out to a computer, then yes, you'll be overwriting what's there (even if nothing in the mof has changed) and more or less resetting DSC's timers. As long as nothing in the MOF has changed, then this isn't really a big deal; your resources will just run their Test commands, everything will say it's already configured, and it's done.

    The same is essentialy true for the DSC pull server; if the MOF file's checksum changes, then the client will download and apply the new one just the same as if it had been pushed with Start-DscConfiguration. This will happen every time you recompile your MOF file, since it includes the date and time that it was generated (which will in turn modify the checksum.)

    I only see this as being a problem if you've set your LCM to run in either ApplyAndMonitor or ApplyOnly mode. In that case, when you push down the new MOF file, DSC would wind up trying to correct any configuration drift again, instead of just reporting (or doing nothing.) If you're set to ApplyAndAutoCorrect mode, then you won't really notice the difference anyway, other than timing.

  • #20743

    Points: 4
    Rank: Member

    perhaps your scirpt could check each computer and see if it already has DSC running.

    I think looking for .mof files in C:\Windows\System32\Configuration might work.

The topic ‘LCM reconfiguration behavior?’ is closed to new replies.