2013-11-11
#powershell
#configuration-management
#sysadmin
In the run up to Windows 2012 R2 I've not been paying as close attention as I would normally, meaning that I seem to have missed out on an interesting new feature in powershell 4 called Desired State Configuration (or DSC).
Example configuration to ensure that Hyper-V feature is installed on hv01-hv03 # Basically a block that can be used to generate a file Configuration HyperVNodeCfg { Node ("hv01", "hv02", "hv03") { WindowsFeature HyperVFeature { Ensure = "Present" Name = "Hyper-V" } } } # Compile to MOF HyperVNodeCfg -OutputPath HyperVNodeCfg # Apply the MOF Start-DscConfiguration -Path HyperVNodeCfg -Wait -Verbose It ships with Windows 8.