This is sixth part of 10 series blog on LCM APIs and Internals. In last part, we saw “How to Apply Configuration to target Nodes” using three different methods, namely WMI, CIM and DSC Cmdlet.
In this post, we will continue our journey and would see “Sending and Applying Configuration to target Nodes” using the same three methods.
Last couple of psts discussed and described the process of sending configurations to the target nodes. In this post, we will look into sending and applying configurations to target nodes as a single step. We have seen that sending and applying configuration to target nodes is responsibility of LCM. There is a DSC cmdlet names start-dscconfiguration that sends and applies the configuration together.
Using DSC Cmdlet
We know the usage of Start-dscConfiguration from previous blog posts. It takes path of the mof file to be send to the target node and also apply the same.
Windows Management Instrumentation (WMI)
We can use WMI Cmdlets to send and Apply Configurations stored with DSC LCM. We can see in Image below that we are invoking a WMI method named “SendConfigurationApply” on class “MSFT_DSCLocalConfigurationManager” available in WMI namespace “ROOT\Microsoft\Windows\DesiredConfigurationManager”. The method take UInt8Array type configurationData parameter and Boolean Force parameter. It sends the configuration as Configurationdata to the target node and applies the same immediately on the target node. There is no generation of Pending.Mof file in this case. The content of Configurationdata finds its place within Current.mof file. The content of Current.mof file is placed within Previous.mof file.
Common Information Model (CIM)
All the steps remain same with that of WMI however the only difference is using a CIM cmdlet instead of WMI cmdlet and parameters are sent as hashtable.
Hope this Post helps!