Examples/Sample_xWindowsOptionalFeatureSet_Disable.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<#
    .SYNOPSIS
        Disables the Windows optional features TelnetClient and LegacyComponents and removes all
        files associated with these features.
#>

Configuration xWindowsOptionalFeatureSet_Disable
{
    Import-DscResource -ModuleName 'xPSDesiredStateConfiguration'

    xWindowsOptionalFeatureSet WindowsOptionalFeatureSet1
    {
        Name = @('TelnetClient', 'LegacyComponents')
        Ensure = 'Absent'
        RemoveFilesOnDisable = $true
    }
}