Add or hide Windows features
Windows includes optional features that aren't installed by default, but you can add later. These features are called Features on Demand, and can be installed at any time. Some of these features are language resources like language packs or handwriting support. On organization-owned devices, you can control access to these other features. You can use group policy or mobile device management (MDM) policies to hide the UI from users, or use Windows PowerShell to enable or disable specific features.
Use the Windows Settings app to add or uninstall features
Open the Start menu and search for Settings.
In the Settings app, search for "optional" and select Optional features.
You can also use the following shortcut to open it directly:
To add a feature:
Select View features next to "Add an optional feature."
Find the feature you want to add, like XPS Viewer. Select the box to add it. You can select multiple features.
Select Next. Review the list of features you selected, and then select Install to add the selected features.
To uninstall a feature:
Search for it in the list of Installed features.
Expand the section, and select Uninstall.
In the Search bar, search for "apps" and select Apps and features.
Select Optional features > Add a feature.
Select the feature you want to add, like XPS Viewer, and then select Install.
When the installation completes, the feature is listed in Apps & features. In Apps & features > Optional features > More Windows features, there are more features that you and your users can install.
To uninstall a feature, open the Settings app. Select the feature, and then select Uninstall.
Use group policy or MDM policies to hide Windows features
By default, the OS might show Windows features and allow users to install and uninstall these optional apps and features. To hide Windows features on your user devices, you can use group policy or an MDM provider like Microsoft Intune.
If you use group policy, use the
User Configuration\Administrative Template\Control Panel\Programs\Hide "Windows Features" policy. By default, this policy may be set to Not configured, which means users can add or remove features. When this setting is Enabled, the settings page to add optional features is hidden on the device.
You can't use group policy to disable specific Windows features, such as XPS Viewer. If you want to disable specific features, use Windows PowerShell.
If you want to hide the entire Apps feature in the Settings app, use the
User Configuration\Administrative Template\Control Panel\Programs\Hide "Programs and Features" page policy.
If you want to hide the entire Apps feature in the Settings app, you can use a configuration policy on Intune enrolled devices. For more information on the settings you can configure, see Control Panel and Settings device restrictions in Microsoft Intune.
Use Windows PowerShell to disable specific features
To disable specific features, use the Windows PowerShell Disable-WindowsOptionalFeature cmdlet.
There isn't a group policy that disables specific Windows features.
To automate disabling specific features, create a scheduled task to run a PowerShell script. For more information about Windows task scheduler, see Task Scheduler for developers.
Microsoft Intune can also run PowerShell scripts. For more information, see Use PowerShell scripts on Windows client devices in Intune.
To enable specific features, use the Enable-WindowsOptionalFeature cmdlet.
Another useful PowerShell cmdlet is Get-WindowsOptionalFeature. Use this cmdlet to view information about optional features in the current OS or a mounted image. This cmdlet returns the current state of features, and whether a restart may be required when the state changes.