Examples/Sample_WindowsOptionalFeatureSet_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 WindowsOptionalFeatureSet_Disable
{
    Import-DscResource -ModuleName 'PSDscResources'

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