Skip to content

Latest commit

 

History

History
94 lines (73 loc) · 2.47 KB

File metadata and controls

94 lines (73 loc) · 2.47 KB

DSC Resource 'WindowsOptionalFeatures'

WindowsOptionalFeatures enables or disables Windows optional features on a Windows client OS.

When to use 'WindowsOptionalFeatures'

Use this resource when you need to enable or disable optional features on Windows client operating systems (e.g., Hyper-V, Windows Subsystem for Linux, .NET Framework 3.5). For Windows Server roles and features, use WindowsFeatures instead.

Source

DSC Resource

Documentation

Table 1. Attributes of category 'WindowsOptionalFeatures'
Parameter Attribute DataType Description Allowed Values

Names

Mandatory

String[]

Indicates the name of the feature that you want to ensure is added or removed. This is the same as the Name property from the Get-WindowsOptionalFeature cmdlet, and not the display name of the feature.

[+ | -]<name>

RemoveFilesOnDisable

Boolean

Set to true to remove all files associated with the features when Ensure is set to Absent.

  • True

  • False (default)

NoWindowsUpdateCheck

Boolean

Specifies whether DISM contacts Windows Update (WU) when searching for the source files to enable a feature. If true, DISM does not contact WU.

  • True

  • False (default)

Example
WindowsOptionalFeatures:
  RemoveFilesOnDisable: false
  NoWindowsUpdateCheck: false
  Names:
  - +TFTP
  - -TelnetClient
  - Hyper-V
Recommended Lookup Options in Datum.yml (Excerpt)
default_lookup_options: MostSpecific

lookup_options:

  WindowsOptionalFeatures:
    merge_hash: deep
  WindowsOptionalFeatures\Names:
    merge_basetype_array: Unique
See also