Need Explanation on Configuration Stage: Current, Pending, Previous

Hello,

I find the DSC configuration has 3 stages: Current, Pending, Previous

However I cannot find more details anywhere about why there are 3 stages and what’s the workflow for them.

From my understanding, the configuration are running in “Pending” stage to prepare and check something.
And then it turns to “Current” stage with a MOF file named Current.mof, and LCM does the consistency check regularly.
For the “Previous” stage, if I re-run `Start-DscConfiguration` the “Current” MOF should be turned to “Previous”. But I don’t see any reason why we need “Previous” MOF.

If I guess right, the DSC allows only one configuration on one server: I start a new configuration (or even re-run the same one), the “current” one goes to “previous”.

Please correct me if I am wrong. Let me know more details on this. Also aprreciated if you have found some documents to explain this.

Thanks :slight_smile:

Where are you seeing these three stages?

If I use get-dsclocalconfigurationmanager, I get the LCMState property that has a “pending” state, but not sure if that is what you mean. In that case, Pending actually means it has begun to configure the machine based on a specific mof it has received. Once it finishes processing the configuration, that property changes to “idle”.

The previous.mof is for Restore-DSCConfiguration. To be honest I don’t see much usage of Restore.

@Will, you can find the stage MOF from this folder: C:\Windows\System32\Configuration
For the LCMState from Get-DscLocalConfigurationManager command, I think that’s also a little bit confusing when we talk about the “stage”. From my side, it is “Idle”.

However, there is not too much information on that neither. What I can find now is only this:
https://docs.microsoft.com/en-us/powershell/wmf/5.0/dsc_lcmstate

@Michael, I think that make sense. Thanks.