This topic contains 6 replies, has 3 voices, and was last updated by
April 8, 2016 at 7:35 am #37429
I created a very basic DSC configuration that just enables the 'DSCService' WindowsFeature.
I set the node to 'localhost'.
I executed and it produced a localhost MOF file. I tried a Start-DscConfiguration and specified a remote server for -ComputerName and it said the computer-specific MOF file for the remote server __servername__ does not exist.
With DSC, do you have to create a mof file for each remote server you want to remotely push to? Is there a way to just create one generic MOF file and use it with any remote server?
April 8, 2016 at 7:40 am #37430KeymasterTopics: 13Replies: 4872Points: 1,811Rank: Community Hero
Start-DscConfiguration uses its -computername parameter to look for the actual MOF filename, which is why it's failing. You could just use Copy-Item to create one copy of the MOF for each computer you planned to target.
It's more just the way Start-DscConfiguration was implemented than a restriction of any kind. In Pull mode, which is what most people are expected to do, you can have just one physical MOF, with multiple machines configured to pull it.
April 8, 2016 at 8:09 am #37432
So I take it from your reply, that with the push method, I will need a MOF for each destination node, sadly. I also am taking away that it is not the case for the pull method (which most people do).
April 8, 2016 at 8:18 am #37434KeymasterTopics: 13Replies: 4872Points: 1,811Rank: Community Hero
Yeah, more or less. I mean, there's some hacky stuff you can do, but end of the day Start-DscConfiguration really wants a 1:1 correlation.
April 8, 2016 at 9:25 am #37442
When using the 'push' scenario, do the modules (such as one downloaded like xSharePoint) need to exist at the destination node as well?
April 8, 2016 at 9:25 am #37443ParticipantTopics: 29Replies: 125Points: 0Rank: Member
You can "cheat" by running it locally so you don't end up using the -computername command. basically write a little wrapper function that copies the mof out then executes the Start-DSCConfiguration locally on that host.
Shouldn't take too long to write.
April 8, 2016 at 9:30 am #37445ParticipantTopics: 29Replies: 125Points: 0Rank: Member
All modules (declared in the mof) always need to be present on the target node. During a push scenario, v4 will require you to copy them over, but you can setup a repo in v5 that will work. Both v4 and v5 will let you use a centralized repo in pull mode.
Good article (not my own) on it here: http://nanalakshmanan.com/blog/Push-Config-Pull-Module/
EDIT: I edit because my typing sucks
The topic ‘Creating one MOF for many servers’ is closed to new replies.