Examples/Sample_xWindowsFeatureSet_Uninstall.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<#
    .SYNOPSIS
        Uninstalls the TelnetClient and RSAT-File-Services Windows features, including all their
        subfeatures. Logs the operation to the file at 'C:\LogPath\Log.log'.
#>

Configuration xWindowsFeatureSetExample_Install
{
    [CmdletBinding()]
    param ()

    Import-DscResource -ModuleName 'xPSDesiredStateConfiguration'

    xWindowsFeatureSet WindowsFeatureSet1
    {
        Name = @( 'Telnet-Client', 'RSAT-File-Services' )
        Ensure = 'Absent'
        IncludeAllSubFeature = $true
        LogPath = 'C:\LogPath\Log.log'
    }
}