Checking the current LCM configuration status

First off, it is very easy to find out when a DSC configuration script will be applied to a given target node, and by now, you can guess where to look. You configured this information when you set up the target node to talk to the DSC pull server using Set-DscLocalConfigurationManager, and you can use Get-DscLocalConfigurationManager to view it. RefreshFrequencyMins controls how often to check with the DSC pull server if there is a new DSC configuration to apply and ConfigurationModeFrequencyMins controls how often DSC checks the target node if the current state has drifted from what is expected:

[PS] Get-DscLocalConfigurationManager | 
Select RefreshFrequencyMins,RefreshMode,ConfigurationModeFrequencyMins ConfigurationModeFrequencyMins : 15 RefreshFrequencyMins : 30 RefreshMode : PULL

The default value for ConfigurationModeFrequencyMins is 15, and that is also the lowest it can be set to. If you are wondering why you can't set it any lower, consider that DSC has to check the current state and then correct it and report on it, all between scheduled runs. 15 minutes is more than enough time for this to happen while allowing additional time if things are going slowly or a particularly long DSC configuration is being applied. If this is still bothering you, remember that DSC and other CM products do not guarantee immediate consistency; they guarantee eventual consistency.

At a scale of thousands of nodes, all CM products operate this way to ensure performant response and timely execution. The default value for RefreshFrequencyMins is 30, and the same logic applies to checking for new DSC configurations. You do not want thousands of target nodes contacting your DSC pull server every minute for changes; otherwise, you will overload even the beefiest of servers.

In WMF 5, you can use Get-DscLocalConfigurationManager to get information about its new properties:

[PS]> Get-DscLocalConfigurationManager
    
ActionAfterReboot              : ContinueConfiguration
AgentId                        : D73A1F3E-542D-11E5-80C2-0800279ED44B
AllowModuleOverWrite           : True
CertificateID                  : 32A4F6CC5A79D5EF2D4DEC6454E9CF20A316F3DB
ConfigurationDownloadManagers  : {[ConfigurationRepositoryWeb]ConfigurationManager}
ConfigurationID                :
ConfigurationMode              : ApplyAndAutoCorrect
ConfigurationModeFrequencyMins : 60
Credential                     :
DebugMode                      : {NONE}
DownloadManagerCustomData      :
DownloadManagerName            :
LCMCompatibleVersions          : {1.0, 2.0}
LCMState                       : Idle
LCMStateDetail                 :
LCMVersion                     : 2.0
StatusRetentionTimeInDays      : 10
PartialConfigurations          :
RebootNodeIfNeeded             : True
RefreshFrequencyMins           : 30
RefreshMode                    : Pull
ReportManagers                 : {}
ResourceModuleManagers         : {}
PSComputerName                 :  

So, we now know how to find out how often DSC will check to see whether there are new DSC configurations to apply and whether or not it has to apply one to the target node.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset