Manage MOF files

Welcome Forums DSC (Desired State Configuration) Manage MOF files

Viewing 7 reply threads
  • Author
    Posts
    • #191308
      Participant
      Topics: 13
      Replies: 58
      Points: 268
      Rank: Contributor

      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?

    • #191350
      Senior Moderator
      Topics: 8
      Replies: 1141
      Points: 3,927
      Helping Hand
      Rank: Community Hero

      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.

    • #191461
      Participant
      Topics: 1
      Replies: 47
      Points: 160
      Helping Hand
      Rank: Participant

      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: https://gaelcolas.com/2018/01/29/the-dsc-configuration-data-problem/

      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: https://livestream.com/gaelcolas/events/8824779/videos/196854817

      Hope that helps 🙂

    • #191545
      Participant
      Topics: 13
      Replies: 58
      Points: 268
      Rank: Contributor

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

    • #191863
      Participant
      Topics: 13
      Replies: 58
      Points: 268
      Rank: Contributor

      Any suggestions on the above?

    • #191920
      Participant
      Topics: 1
      Replies: 4
      Points: 39
      Rank: Member

      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
    • #192085
      Participant
      Topics: 13
      Replies: 58
      Points: 268
      Rank: Contributor

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

    • #192205
      Participant
      Topics: 1
      Replies: 4
      Points: 39
      Rank: Member
Viewing 7 reply threads
  • You must be logged in to reply to this topic.