forked from dsccommunity/xPSDesiredStateConfiguration
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSample_xWindowsOptionalFeature.ps1
More file actions
39 lines (33 loc) · 971 Bytes
/
Sample_xWindowsOptionalFeature.ps1
File metadata and controls
39 lines (33 loc) · 971 Bytes
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
33
34
35
36
37
38
39
<#
.SYNOPSIS
Enables the Windows optional feature with the specified name and outputs a log to the specified path.
.PARAMETER FeatureName
The name of the Windows optional feature to enable.
.PARAMETER LogPath
The path to the file to log the enable operation to.
.NOTES
Can only be run on Windows client operating systems and Windows Server 2012 or later.
The DISM PowerShell module must be available on the target machine.
#>
Configuration Sample_xWindowsOptionalFeature
{
param
(
[Parameter (Mandatory = $true)]
[String]
$FeatureName,
[Parameter(Mandatory = $true)]
[String]
$LogPath
)
Import-DscResource -ModuleName 'xPSDesiredStateConfiguration'
Node localhost
{
xWindowsOptionalFeature TelnetClient
{
Name = $FeatureName
Ensure = 'Present'
LogPath = $LogPath
}
}
}