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

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

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

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
RebootNodeIfNeeded = $true
ConfigurationMode = ‘ApplyOnly’

} }

SetupLCM -OutputPath C:\dsc\LCM\

It’s whatever the documentation says :).

Thank you so much Don :slight_smile: