Examples/Sample_xWindowsFeatureSet.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<#
    .SYNOPSIS
    Installs the set of features named with all their subfeatures from the specified source.
#>

Configuration $configurationName
{
    param (
        [Parameter(Mandatory = $true)]
        [String[]]
        $FeatureNames,

        [Parameter(Mandatory = $true)]
        [String]
        $LogPath,

        [Parameter(Mandatory = $true)]
        [String]
        $Source
    )

    Import-DscResource -ModuleName xPSDesiredStateConfiguration

    xWindowsFeatureSet WindowsFeatureSet1
    {
        Name = $FeatureNames
        Ensure = "Present"
        IncludeAllSubFeature = $true
        LogPath = $LogPath
        Source = $Source
    }
}