DSC: VM should not go and change its state again.

This topic contains 4 replies, has 2 voices, and was last updated by  Deep 6 days, 12 hours ago.

  • Author
    Posts
  • #81647

    Deep
    Participant

    Hello Everyone,

    I'm writing the DSC script for configuring the virtuals machine, I just want that machine should get configured with the push method and should not go and check its .mof file again.

    This will be like I create a virtual machine executes the DSC script, the machine will be configured and then I don't bother if it changes its state again.

    please help me with the appropriate approach to achieving the objective.

    This would be a great help

    Thank you in advance

  • #81664

    Don Jones
    Keymaster

    You would configure its LCM to “ApplyOnce,” then, not “ApplyAndAutoCorrect.” This is actually the default on most systems.

  • #81688

    Deep
    Participant

    Thanks alot Don,

    Could you please confirm if it is ApplyOnce on ApplyOnly, as I'm unable to find ApplyOnce on the technet doc.

    Script Block
    Configuration setupLCM
    {

    Node testserver
    {
    LocalConfigurationManager
    {
    RebootNodeIfNeeded = $true
    ConfigurationMode = 'ApplyOnly'

    }
 }

    }

    SetupLCM -OutputPath C:\dsc\LCM\

  • #81692

    Don Jones
    Keymaster

    It's whatever the documentation says :).

  • #81710

    Deep
    Participant

    Thank you so much Don 🙂

You must be logged in to reply to this topic.