{"id":495,"date":"2019-07-17T11:24:03","date_gmt":"2019-07-17T11:24:03","guid":{"rendered":"http:\/\/172.23.1.43\/?p=495"},"modified":"2022-06-07T22:26:13","modified_gmt":"2022-06-07T22:26:13","slug":"optional-feature-csp","status":"publish","type":"post","link":"https:\/\/blog.n-dol.org\/2019\/07\/17\/optional-feature-csp\/","title":{"rendered":"Optional Feature CSP"},"content":{"rendered":"\n

One of the common things with Windows is to activate or deactivate while provisioning a machine are Features.
Good for us there is a CSP available since Windows 1903<\/u><\/strong> to manage those. <\/p>\n\n\n\n\n\n\n\n

Disclaimer:<\/strong> While this CSP is in Windows 10, this is an undocumented feature, I can’t guarantee that this will 100% work in the future, also, all my testing were done with Workspace ONE UEM which allow you to send any command to the devices and this worked perfectly.<\/p><\/blockquote>\n\n\n\n

Get the feature name<\/h2>\n\n\n\n

With Windows 10, there is 2 types of feature, Optional Feature and Feature On Demand.
To use the CSP we need the real\/internal name of those feature<\/p>\n\n\n\n

Optional Features<\/h3>\n\n\n\n

Optional features are part of the OS, like IIS, Hyper-V and so on.
To get the list of Optional Feature available and their name, we use this PowerShell command<\/p>\n\n\n\n

Get-WindowsOptionalFeature -Online | Format-Table<\/code><\/pre>\n\n\n\n

Features On Demand<\/h3>\n\n\n\n

Feature On Demand can be added at anytime like an application, this currently include language pack (OCR, Text to Speech, Font, etc.), RSAT Tools, .NET Fx3 among others.
On demand features don’t use the concept of parent like the optional does, i.e IIS is the parent of the FTP server, it use the concept of satellites and dependencies (introduced in 1809) which are handled by the CSP. E.g: RSAT have satellites and dependencies.
To get the list of Feature On Demand, use the following PowerShell command.<\/p>\n\n\n\n

Get-WindowsCapability -Online | Format-Table<\/code><\/pre>\n\n\n\n

It returns the name and the current state of the feature.
More detail also here : https:\/\/docs.microsoft.com\/en-us\/windows-hardware\/manufacture\/desktop\/features-on-demand-non-language-fod<\/a> <\/p>\n\n\n\n

Description of the CSP<\/h2>\n\n\n\n

OptionalFeature CSP is not available in the online documentation. However the DDF file is available. This the definition file of the CSP so we know how to use it.
There is 3 node in the CSP, which straight forward to understand.<\/p>\n\n\n\n