Manage MOF files

What is the best practice for managing MOF files. For example if I want to have 300 servers with the same configuration, then how can I not end up having 300 MOF files?

it should be technically possible to create a mof file targeting localhost, rename it to pending.mof and keeping it under c:\Windows\System32\Configurations of all the machines, then do an Update-DSCConfiguration.

But not sure about a neat way of doing this.

You can use Named configuration, but you probably shouldn’t.

Applying the same MOF means you have no uniqueness per node, not even credentials or encryption certificate. Usually, that’s bad…

Managing MOFs should not be the problem, the question is what are you trying to achieve? MOF is just the result of the compilation step that should happen in a pipeline, and then should be applied automatically whenever possible (Pull Mode), or automatically made available for push mode.

Usually, making sure you don’t repeat yourself for 300 nodes is the actual challenge with DSC as I explained here:

If that’s what you’re trying to solve, then I recommend looking at the DSC Workshop repository and follow the DSC Workshop video here:

Hope that helps :slight_smile:

How about using the same GUID for assigning the same MOF to multiple nodes?

Any suggestions on the above?

If you have 300 servers, it is a best practice to have a DSC Pull Server. Using a DSC Pull Server and powershell 5, you can use and define ConfigurationName and then all your target nodes will use that specific configuration name.

High level steps:

  1. Configure in LCM ConfigurationName
  2. Compile the mof to use this configuration name
  3. Create checksum for that mof
  4. Copy the 2 files, (mof and checksum on you DSC Pull server)
  5. Wait for clients to pickup the dsc configuration or run update-dscconfiguration

Thanks for the reply. Any article with detailed steps on the above.