Skip to content

Instantly share code, notes, and snippets.

@dfinke
Created September 15, 2015 15:59
Show Gist options
  • Save dfinke/bbc9ed2fea7c66d3a24a to your computer and use it in GitHub Desktop.
Save dfinke/bbc9ed2fea7c66d3a24a to your computer and use it in GitHub Desktop.
Function GenerateDSC {
$WindowsFeature = Get-WindowsFeature | Where {$PSItem.installed -and $PSItem.name -match 'net-framework'} | % {
@"
WindowsFeature $($PSItem.name) {
Ensure = 'Present'
Name = "$($PSItem.name)"
}
"@
}
@"
Configuration DotNetFrameWork{
param(`$TargetMachine)
Node `$TargetMachine {
$WindowsFeature
}
}
"@
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment