Last active
June 10, 2018 18:55
-
-
Save techthoughts2/ad013b46621aad5c08f53a26900d551d to your computer and use it in GitHub Desktop.
Basic DSC example of simple configuration using localhost. The compiled MOF could be pulled to a variety of different servers or renamed and pushed to a variety of different servers
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 Demo3 { | |
Param () | |
Import-DscResource -ModuleName PSDesiredStateConfiguration | |
node localhost { | |
#------------------------------------ | |
WindowsFeature 'Telnet-Client' { | |
#DependsOn = "[WindowsFeature]Failover-Clustering" | |
Ensure = "Absent" | |
Name = "Telnet-Client" | |
} #telnet | |
#------------------------------------ | |
File RequiredDirectory { | |
Ensure = 'Present' | |
Type = 'Directory' | |
DestinationPath = "C:\RequiredDirectory" | |
} #requiredDirectory | |
#------------------------------------ | |
File NewBossRequest { | |
Ensure = 'Present' | |
Type = 'Directory' | |
DestinationPath = "C:\NewDirectory" | |
} #newBossDirectory | |
#------------------------------------ | |
} #localhost | |
} #close configuration | |
Demo3 -OutputPath C:\DSC\Test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment