Last active
June 10, 2018 18:57
-
-
Save techthoughts2/e72ef7f0a9b9797d44e0a77f48940883 to your computer and use it in GitHub Desktop.
This DSC example contains multiple nodes and compile to multiple MOFs, one for each server. In this example the code configuration is not duplicated, and is instead replicated out for each node during the compile of the MOFs. This is often more effic
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Configuration Demo2 { | |
Param () | |
Import-DscResource -ModuleName PSDesiredStateConfiguration | |
node $AllNodes.NodeName { | |
#------------------------------------ | |
WindowsFeature 'Telnet-Client' { | |
#DependsOn = "[WindowsFeature]Failover-Clustering" | |
Ensure = "Absent" | |
Name = "Telnet-Client" | |
} #telnet | |
#------------------------------------ | |
File RequiredDirectory { | |
Ensure = 'Present' | |
Type = 'Directory' | |
DestinationPath = "C:\RequiredDirectory" | |
} #requiredDirectory | |
#------------------------------------ | |
} #allNodes | |
} #close configuration | |
$cd = @{ | |
AllNodes = @( | |
@{ NodeName = 'Server1'}, | |
@{ NodeName = 'Server2'}, | |
@{ NodeName = 'Server3'} | |
) | |
} | |
Demo2 -Configuration $cd -outputpath c:\DSC\Test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment