Minimum values for ConfigurationModeFrequencyMins and RefreshFrequencyMins

Hello,

I am new to DSC and am just working through the examples in the DSC book. Great resource and so far things are going well. I am through setting up the pull server and that works fine. I was branching out a bit and wanted to reconfigure the my target to ApplyAndAutocorrect but since this was test I wanted the intervals to be something less than 30min and 15min so I did the following

  1. Set the Configuration mode on my pull client to ApplyAndAutoCorrect
  2. Set the ConfigurationModeFrequencyMins to 10
  3. Set the RefreshFrequencyMins to 5 (I know that it needs to be a multiple)
  4. Rebuilt the MOF and reloaded it.

I did it with Verbose and all looked like it worked. The Configuration mode was properly changed but the intervals are still at 30 and 15. I tried moving the Configuration mode interval to 60 minutes. That worked but it seems like there is a lower limit? I haven’t found anything to that effect but that seems to be the way it is working. It would be nice to be able to set it lower for testing.

Configuration SetPullMode
{
param([string]$guid)
Node W2012R2DSC.headgeek.local
{
LocalConfigurationManager
{

		ConfigurationMode = 'ApplyAndAutoCorrect'
        ConfigurationModeFrequencyMins = 10
		ConfigurationID = $guid
		RefreshMode = 'Pull'
        RefreshFrequencyMins = 5
    	DownloadManagerName = 'WebDownloadManager'
		DownloadManagerCustomData = @{
			ServerUrl = 'http://W2012R2DSCPull.headgeek.local:8080/PSDSCPullServer.svc';
			AllowUnsecureConnection = 'true' }
	}
}

}

$guid = “3a2e9626-3071-4d9d-b2b3-824216b53275”
SetPullMode -guid $guid
Set-DSCLocalConfigurationManager -Computer W2012R2DSC.headgeek.local -Path ./SetPullMode –Verbose

15 and 30 are hardcoded minimums. In the book, I use lower values to demonstrate (when I teach) that no matter what you do, you can’t go below those values. I think the book mentions that. The documentation on the LCM configuration (on TechNet) definitely describes the minimums.

If I remember correctly, those rules change slightly in WMF 5.0. You can have the Configuration frequency be equal to or less than the Refresh frequency, if you like (though I think they still have to be multiples of each other.) They’ve also added some output to tell you that your values are being automatically adjusted to conform to the “multiples” rules, when the configuration is applied.

Thanks for the reply. Yes you are correct the book does give the minimums but it is in the back and I just missed it. As I was looking for it I saw the handy script on p. 18 that shows how to force a Configuration Evaluation. That works great for testing and now I don’t have to wait for 30 minutes to see what happens. So everything works as in the book on the pull example but I have one thing I still don’t understand.

  1. It pulls the configuration and installs Windows Server Backup.
  2. I run Get-DSCGetConfiguration and it shows Ensure: Present
  3. I run Remove-WindowsFeature -name Windows-Server-Backup
  4. I run Get-DSCGetConfiguration and it shows Ensure: Absent. This is what I don’t understand. I know it is Absent but I thought this was the “Desired State” not the “Current State”. At this point if I run evaluation script it puts everything back the way it should be and Ensure is back to Present so I think I am just having trouble understanding the definition of Ensure.

Thanks

GetConfiguraton returns the current, not the desired state. Unless the LCM is set to ApplyAndAutoCorrect, it won’t re-install to maintain the desired state.

“Ensure” in a configuration script is what you WANT. What GetConfiguation returns is what IS, not what’s desired. It actually makes a bit more sense in v5, where you can do a comparison and get a detailed report of what’s not “as desired.”

OK. Thanks. It sort of makes sense but isn’t the way that I would think of it.

Just for fun I set up a W2008R2 Server and am trying to get it to pull the same configuration that installs the Backup feature. When I run the script to set the Pull mode it works and when I do a Get-DscLocalConfigurationManager on the W2008R2 server it shows that it is in Pull mode and looks correct but I have 2 problems

  1. After waiting over 60 minutes, Backup is still not installed and there is no DSC Configuration. When I run get-DscConfiguration on the server it says there is no Current Configuration
  2. The script to force evaluation doesn’t work. The script works fine when I run it on a W2012 server. The error looks as follows:

Invoke-CimMethod : The SendConfigurationApply function did not succeed.
At C:\Users\roger\Desktop\ForceEval.ps1:10 char:1

  • Invoke-CimMethod @params
  •   + CategoryInfo          : NotSpecified: (root/Microsoft/...gurationManager:String) [Invoke-CimMethod], CimExceptio
     n
      + FullyQualifiedErrorId : MI RESULT 1,Microsoft.Management.Infrastructure.CimCmdlets.InvokeCimMethodCommand
    
    
    

Any thoughts on where to start to look for the problem? Thanks

Values of the configuration message I know well once I was lost my configuration messages mistakenly by the deleting of others. Huddling of the messages slightly I used <span style="font-size: 11pt; font-family: Calibri,Arial; font-weight: normal; font-style: normal;" data-sheets-value="{"1":2,"2":"bestdissertation"}" data-sheets-userformat=“{"2":13059,"3":{"1":0},"4":[null,2,11982760],"11":3,"12":0,"15":"Calibri","16":11}”><a rel="dofollow" href="<span style="font-size: 11pt; font-family: Calibri,Arial; font-weight: normal; font-style: normal;" data-sheets-value="{"1":2,"2":"bestdissertation"}" data-sheets-userformat=“{"2":13059,"3":{"1":0},"4":[null,2,11982760],"11":3,"12":0,"15":"Calibri","16":11}”><span style="font-size: 11pt; font-family: Calibri,Arial; font-weight: normal; font-style: normal;" data-sheets-value="{"1":2,"2":"bestdissertation"}" data-sheets-userformat=“{"2":13059,"3":{"1":0},"4":[null,2,11982760],"11":3,"12":0,"15":"Calibri","16":11}”>https://australianwritings.net/“><span style="font-size: 11pt; font-family: Calibri,Arial; font-weight: normal; font-style: normal;" data-sheets-value="{"1":2,"2":"bestdissertation"}” data-sheets-userformat=“{"2":13059,"3":{"1":0},"4":[null,2,11982760],"11":3,"12":0,"15":"Calibri","16":11}”>https://australianwritings.net/website to want my message that I missed come back.