This topic contains 3 replies, has 3 voices, and was last updated by
May 22, 2017 at 8:32 pm #71242ParticipantPoints: 0Rank: Member
I want to use DSC to configure multiple machines in the same manner. I am confused as to how 1 MOF can accomplish this (pull mode). If I create a configuration file for a node and compile it into a MOF, that MOF references THAT individual node, no? Surely I don't have to specify EVERY machine name that I want to be configured. Is someone able to clarify this?
May 22, 2017 at 8:46 pm #71245ParticipantPoints: 1Rank: Member
I had the same question when I started using DSC. Here is what I ended up doing:
1. Write your configurations with only a Configuration block (no Node block)
2. When you compile one of these configs, it will generate a localhost.mof file
3. Change the name of the file to whatever you'd like, to describe the config
4. Publish that config to the pull server
5. Now make an LCM config with a "Node localhost" block which will specify the correct pull server, registration key, and ConfigurationNames (the one you uploaded to the pull server)
6. Compile the LCM config and apply it to however many computers you want to have the configuration you referenced
Again, that's just how I did it; there are probably other ways.
May 23, 2017 at 12:52 am #71282ParticipantPoints: 0Rank: Member
The contents of the MOF file that is created does not have any tie to a server so whether you specify a node name in the configuration or leave the node block out like Eric did, it will not matter. The node name specified in the configuration will only affect the name that the MOF file is given. The MOF file name can always be changed as Eric did. The rest of what Eric points out is as the steps he took are exactly right.
Here is the documentation for how to set the meta-configuration up to use configuration names: https://msdn.microsoft.com/en-us/powershell/dsc/pullclientconfignames in case you are interested.
June 1, 2017 at 9:08 pm #71936ParticipantPoints: 0Rank: Member
The topic ‘DSC/MOF Confusion’ is closed to new replies.