1 Import-Module "$PSScriptRoot\..\CompositeResourceHelper.psm1"
3 Configuration WindowsFeatureSet
5 [CmdletBinding(SupportsShouldProcess=$true)]
7 [Parameter(Mandatory=$true)]
8 [ValidateNotNullOrEmpty()]
12 [ValidateSet('Present','Absent')]
16 [ValidateNotNullOrEmpty()]
21 $IncludeAllSubFeature,
24 [System.Management.Automation.PSCredential]
27 [ValidateNotNullOrEmpty()]
32 $psboundParams = $PSBoundParameters
33 $optionalParameters = @("Ensure","Source","IncludeAllSubFeature","Credential","LogPath")
34 $keyParamName = "Name"
35 $resourceName = "WindowsFeature"
37 #build common parameters for all WindowsFeature resource nodes
38 [string] $commonParameters = BuildResourceCommonParameters -KeyParamName $keyParamName -OptionalParams $optionalParameters -PSBoundParams $psboundParams
40 #build WindowsFeature resource string
41 [string] $resourceString = BuildResourceString -KeyParam $Name -KeyParamName $keyParamName -CommonParams $commonParameters -ResourceName $resourceName
43 $configScript = [scriptblock]::Create($resourceString)