WindowsFeatures installs Windows Features on a Windows Server OS.
Source |
|
DSC Resource |
|
Documentation |
-
Target machine must be running Windows Server 2008 or later.
-
Target machine must have access to the DISM PowerShell module.
-
Target machine must have access to the ServerManager module (provided by default on Windows Server).
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
Names |
String[] |
Indicates the name of the role or feature that you want to ensure is added or removed. This is the same as the Name property from the |
[+ | -]<name> |
|
Hashtable[] |
List windows features with additional properties |
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
Name |
Key |
Indicates the name of the role or feature that you want to ensure is added or removed. This is the same as the Name property from the |
||
Credential |
PSCredential |
Indicates the credentials to use to add or remove the role or feature. |
||
IncludeAllSubFeature |
Boolean |
Set this property to |
|
|
Source |
String |
Specifies the path to feature files, if the files are not available in the local feature store of the target computer or VHD. Valid values for this parameter are either a network path or the path to a Windows image file (WIM). |
||
LogPath |
String |
Indicates the path to a log file where you want the resource provider to log the operation. |
||
Ensure |
String |
Indicates if the role or feature is added. To ensure that the role or feature is added, set this property to |
|
|
UseLegacyResource |
String |
Indicates if the resource |
|
WindowsFeatures:
Names:
- Hyper-V # installs WindowsFeature Hyper-V
- +DHCP # installs WindowsFeature DHCP Server
- -Web-Server # removes WindowsFeature Web-Server (IIS)
- *Web-Server # installs WindowsFeature Web-Server (IIS) with all sub features.
Features:
- Name: NET-Framework-Core
Source: \\contoso.com\InstallationSources\WinSxs
UseLegacyResource: true
- Name: RSAT-AD-Tools
IncludeAllSubFeature: true
Datum.yml
(Excerpt)default_lookup_options: MostSpecific
lookup_options:
WindowsFeatures:
merge_hash: deep
WindowsFeatures\Names:
merge_basetype_array: Unique
WindowsFeatures\Features:
merge_hash_array: UniqueKeyValTuples
merge_options:
tuple_keys:
- Name