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

Welcome Forums DSC (Desired State Configuration) DSC: VM should not go and change its state again.

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

 
Participant
1 year, 1 month ago.

  • Author
    Posts
  • #81647

    Participant
    Points: 0
    Rank: Member

    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

    Keymaster
    Points: 1,625
    Helping HandTeam Member
    Rank: Community Hero

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

  • #81688

    Participant
    Points: 0
    Rank: Member

    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

    Keymaster
    Points: 1,625
    Helping HandTeam Member
    Rank: Community Hero

    It's whatever the documentation says :).

  • #81710

    Participant
    Points: 0
    Rank: Member

    Thank you so much Don 🙂

The topic ‘DSC: VM should not go and change its state again.’ is closed to new replies.