Search code examples
powershelldscpowershell-5.0

DSC V5 - Keeps attempting to reapply a failed configuraiton


We have started using DSC to deploy some applications. We are pushing out the configurations and only want it to run this configuration once and then stop. However it seems that if a configuration fails we end up with a pending configuration which DSC seems to keep attempting to reapply. Is this intended behavior? Is there anyway for us to prevent this happening.

Here are our LCM settings

ActionAfterReboot              : ContinueConfiguration
AgentId                        : 4314CBF5-928E-11E5-941E-00155D0****
AllowModuleOverWrite           : True
CertificateID                  : EBB297F164BDA1C1A7918C12C31D0F70110****
ConfigurationDownloadManagers  : {[ConfigurationRepositoryWeb]DSCHTTP}
ConfigurationID                : 3fa96bab-ac50-4b80-a9ac-384bfd*****
ConfigurationMode              : ApplyOnly
ConfigurationModeFrequencyMins : 15
Credential                     : 
DebugMode                      : {NONE}
DownloadManagerCustomData      : 
DownloadManagerName            : 
LCMCompatibleVersions          : {1.0, 2.0}
LCMState                       : Idle
LCMStateDetail                 : 
LCMVersion                     : 2.0
StatusRetentionTimeInDays      : 10
PartialConfigurations          : 
RebootNodeIfNeeded             : True
RefreshFrequencyMins           : 30
RefreshMode                    : Push
ReportManagers                 : {}
ResourceModuleManagers         : {[ResourceRepositoryWeb]DSCHTTP}
PSComputerName                 : D6B*****01
PSComputerName                 : D6B*****01

Solution

  • Here is a blog that explains how LCM behaves and how you can get out of it http://nanalakshmanan.github.io/blog/Converging-to-a-desired-state/