Enable-WindowsOptionalFeature to enable Windows OptionalFeatures in Windows 10

This page introduces the command of the function that can be added by the "Enable-WindowsOptionalFeature" cmdlet in the Windows 10 environment. You can also add or remove control panel features, but it's easier to do with commands. Open Powershell with administrator privileges before running it.

Client-DeviceLockdown Enable-WindowsOptionalFeature -Online -FeatureName Client-DeviceLockdown
Client-EmbeddedBootExp Enable-WindowsOptionalFeature -Online -FeatureName Client-EmbeddedBootExp
Client-EmbeddedLogon Enable-WindowsOptionalFeature -Online -FeatureName Client-EmbeddedLogon
Client-EmbeddedShellLauncher Enable-WindowsOptionalFeature -Online -FeatureName Client-EmbeddedShellLauncher
ClientForNFS-Infrastructure Enable-WindowsOptionalFeature -Online -FeatureName ClientForNFS-Infrastructure
Client-KeyboardFilter Enable-WindowsOptionalFeature -Online -FeatureName Client-KeyboardFilter
Client-ProjFS Enable-WindowsOptionalFeature -Online -FeatureName Client-ProjFS
Client-UnifiedWriteFilter Enable-WindowsOptionalFeature -Online -FeatureName Client-UnifiedWriteFilter
Containers Enable-WindowsOptionalFeature -Online -FeatureName Containers
Containers-DisposableClientVM Enable-WindowsOptionalFeature -Online -FeatureName Containers-DisposableClientVM
DataCenterBridging Enable-WindowsOptionalFeature -Online -FeatureName DataCenterBridging
DirectoryServices-ADAM-Client Enable-WindowsOptionalFeature -Online -FeatureName DirectoryServices-ADAM-Client
DirectPlay Enable-WindowsOptionalFeature -Online -FeatureName DirectPlay
HostGuardian Enable-WindowsOptionalFeature -Online -FeatureName HostGuardian
HypervisorPlatform Enable-WindowsOptionalFeature -Online -FeatureName HypervisorPlatform
IIS-ApplicationDevelopment Enable-WindowsOptionalFeature -Online -FeatureName IIS-ApplicationDevelopment
IIS-ApplicationInit Enable-WindowsOptionalFeature -Online -FeatureName IIS-ApplicationInit
IIS-ASP Enable-WindowsOptionalFeature -Online -FeatureName IIS-ASP
IIS-ASPNET Enable-WindowsOptionalFeature -Online -FeatureName IIS-ASPNET
IIS-ASPNET45 Enable-WindowsOptionalFeature -Online -FeatureName IIS-ASPNET45
IIS-BasicAuthentication Enable-WindowsOptionalFeature -Online -FeatureName IIS-BasicAuthentication
IIS-CertProvider Enable-WindowsOptionalFeature -Online -FeatureName IIS-CertProvider
IIS-CGI Enable-WindowsOptionalFeature -Online -FeatureName IIS-CGI
IIS-ClientCertificateMappingAuthentication Enable-WindowsOptionalFeature -Online -FeatureName IIS-ClientCertificateMappingAuthentication
IIS-CommonHttpFeatures Enable-WindowsOptionalFeature -Online -FeatureName IIS-CommonHttpFeatures
IIS-CustomLogging Enable-WindowsOptionalFeature -Online -FeatureName IIS-CustomLogging
IIS-DefaultDocument Enable-WindowsOptionalFeature -Online -FeatureName IIS-DefaultDocument
IIS-DigestAuthentication Enable-WindowsOptionalFeature -Online -FeatureName IIS-DigestAuthentication
IIS-DirectoryBrowsing Enable-WindowsOptionalFeature -Online -FeatureName IIS-DirectoryBrowsing
IIS-FTPExtensibility Enable-WindowsOptionalFeature -Online -FeatureName IIS-FTPExtensibility
IIS-FTPServer Enable-WindowsOptionalFeature -Online -FeatureName IIS-FTPServer
IIS-FTPSvc Enable-WindowsOptionalFeature -Online -FeatureName IIS-FTPSvc
IIS-HealthAndDiagnostics Enable-WindowsOptionalFeature -Online -FeatureName IIS-HealthAndDiagnostics
IIS-HostableWebCore Enable-WindowsOptionalFeature -Online -FeatureName IIS-HostableWebCore
IIS-HttpCompressionDynamic Enable-WindowsOptionalFeature -Online -FeatureName IIS-HttpCompressionDynamic
IIS-HttpCompressionStatic Enable-WindowsOptionalFeature -Online -FeatureName IIS-HttpCompressionStatic
IIS-HttpErrors Enable-WindowsOptionalFeature -Online -FeatureName IIS-HttpErrors
IIS-HttpLogging Enable-WindowsOptionalFeature -Online -FeatureName IIS-HttpLogging
IIS-HttpRedirect Enable-WindowsOptionalFeature -Online -FeatureName IIS-HttpRedirect
IIS-HttpTracing Enable-WindowsOptionalFeature -Online -FeatureName IIS-HttpTracing
IIS-IIS6ManagementCompatibility Enable-WindowsOptionalFeature -Online -FeatureName IIS-IIS6ManagementCompatibility
IIS-IISCertificateMappingAuthentication Enable-WindowsOptionalFeature -Online -FeatureName IIS-IISCertificateMappingAuthentication
IIS-IPSecurity Enable-WindowsOptionalFeature -Online -FeatureName IIS-IPSecurity
IIS-ISAPIExtensions Enable-WindowsOptionalFeature -Online -FeatureName IIS-ISAPIExtensions
IIS-ISAPIFilter Enable-WindowsOptionalFeature -Online -FeatureName IIS-ISAPIFilter
IIS-LegacyScripts Enable-WindowsOptionalFeature -Online -FeatureName IIS-LegacyScripts
IIS-LegacySnapIn Enable-WindowsOptionalFeature -Online -FeatureName IIS-LegacySnapIn
IIS-LoggingLibraries Enable-WindowsOptionalFeature -Online -FeatureName IIS-LoggingLibraries
IIS-ManagementConsole Enable-WindowsOptionalFeature -Online -FeatureName IIS-ManagementConsole
IIS-ManagementScriptingTools Enable-WindowsOptionalFeature -Online -FeatureName IIS-ManagementScriptingTools
IIS-ManagementService Enable-WindowsOptionalFeature -Online -FeatureName IIS-ManagementService
IIS-Metabase Enable-WindowsOptionalFeature -Online -FeatureName IIS-Metabase
IIS-NetFxExtensibility Enable-WindowsOptionalFeature -Online -FeatureName IIS-NetFxExtensibility
IIS-NetFxExtensibility45 Enable-WindowsOptionalFeature -Online -FeatureName IIS-NetFxExtensibility45
IIS-ODBCLogging Enable-WindowsOptionalFeature -Online -FeatureName IIS-ODBCLogging
IIS-Performance Enable-WindowsOptionalFeature -Online -FeatureName IIS-Performance
IIS-RequestFiltering Enable-WindowsOptionalFeature -Online -FeatureName IIS-RequestFiltering
IIS-RequestMonitor Enable-WindowsOptionalFeature -Online -FeatureName IIS-RequestMonitor
IIS-Security Enable-WindowsOptionalFeature -Online -FeatureName IIS-Security
IIS-ServerSideIncludes Enable-WindowsOptionalFeature -Online -FeatureName IIS-ServerSideIncludes
IIS-StaticContent Enable-WindowsOptionalFeature -Online -FeatureName IIS-StaticContent
IIS-URLAuthorization Enable-WindowsOptionalFeature -Online -FeatureName IIS-URLAuthorization
IIS-WebDAV Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebDAV
IIS-WebServer Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServer
IIS-WebServerManagementTools Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServerManagementTools
IIS-WebServerRole Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServerRole
IIS-WebSockets Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebSockets
IIS-WindowsAuthentication Enable-WindowsOptionalFeature -Online -FeatureName IIS-WindowsAuthentication
IIS-WMICompatibility Enable-WindowsOptionalFeature -Online -FeatureName IIS-WMICompatibility
Internet-Explorer-Optional-amd64 Enable-WindowsOptionalFeature -Online -FeatureName Internet-Explorer-Optional-amd64
LegacyComponents Enable-WindowsOptionalFeature -Online -FeatureName LegacyComponents
MediaPlayback Enable-WindowsOptionalFeature -Online -FeatureName MediaPlayback
Microsoft-Hyper-V Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V
Microsoft-Hyper-V-All Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All
Microsoft-Hyper-V-Hypervisor Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Hypervisor
Microsoft-Hyper-V-Management-Clients Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Management-Clients
Microsoft-Hyper-V-Management-PowerShell Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Management-PowerShell
Microsoft-Hyper-V-Services Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Services
Microsoft-Hyper-V-Tools-All Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Tools-All
MicrosoftWindowsPowerShellV2 Enable-WindowsOptionalFeature -Online -FeatureName MicrosoftWindowsPowerShellV2
MicrosoftWindowsPowerShellV2Root Enable-WindowsOptionalFeature -Online -FeatureName MicrosoftWindowsPowerShellV2Root
Microsoft-Windows-Subsystem-Linux Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
MSMQ-ADIntegration Enable-WindowsOptionalFeature -Online -FeatureName MSMQ-ADIntegration
MSMQ-Container Enable-WindowsOptionalFeature -Online -FeatureName MSMQ-Container
MSMQ-DCOMProxy Enable-WindowsOptionalFeature -Online -FeatureName MSMQ-DCOMProxy
MSMQ-HTTP Enable-WindowsOptionalFeature -Online -FeatureName MSMQ-HTTP
MSMQ-Multicast Enable-WindowsOptionalFeature -Online -FeatureName MSMQ-Multicast
MSMQ-Server Enable-WindowsOptionalFeature -Online -FeatureName MSMQ-Server
MSMQ-Triggers Enable-WindowsOptionalFeature -Online -FeatureName MSMQ-Triggers
MSRDC-Infrastructure Enable-WindowsOptionalFeature -Online -FeatureName MSRDC-Infrastructure
MultiPoint-Connector Enable-WindowsOptionalFeature -Online -FeatureName MultiPoint-Connector
MultiPoint-Connector-Services Enable-WindowsOptionalFeature -Online -FeatureName MultiPoint-Connector-Services
MultiPoint-Tools Enable-WindowsOptionalFeature -Online -FeatureName MultiPoint-Tools
NetFx3 Enable-WindowsOptionalFeature -Online -FeatureName NetFx3
NetFx4-AdvSrvs Enable-WindowsOptionalFeature -Online -FeatureName NetFx4-AdvSrvs
NetFx4Extended-ASPNET45 Enable-WindowsOptionalFeature -Online -FeatureName NetFx4Extended-ASPNET45
NFS-Administration Enable-WindowsOptionalFeature -Online -FeatureName NFS-Administration
Printing-Foundation-Features Enable-WindowsOptionalFeature -Online -FeatureName Printing-Foundation-Features
Printing-Foundation-InternetPrinting-Client Enable-WindowsOptionalFeature -Online -FeatureName Printing-Foundation-InternetPrinting-Client
Printing-Foundation-LPDPrintService Enable-WindowsOptionalFeature -Online -FeatureName Printing-Foundation-LPDPrintService
Printing-Foundation-LPRPortMonitor Enable-WindowsOptionalFeature -Online -FeatureName Printing-Foundation-LPRPortMonitor
Printing-PrintToPDFServices-Features Enable-WindowsOptionalFeature -Online -FeatureName Printing-PrintToPDFServices-Features
Printing-XPSServices-Features Enable-WindowsOptionalFeature -Online -FeatureName Printing-XPSServices-Features
SearchEngine-Client-Package Enable-WindowsOptionalFeature -Online -FeatureName SearchEngine-Client-Package
ServicesForNFS-ClientOnly Enable-WindowsOptionalFeature -Online -FeatureName ServicesForNFS-ClientOnly
SimpleTCP Enable-WindowsOptionalFeature -Online -FeatureName SimpleTCP
SMB1Protocol Enable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol
SMB1Protocol-Client Enable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol-Client
SMB1Protocol-Deprecation Enable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol-Deprecation
SMB1Protocol-Server Enable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol-Server
SmbDirect Enable-WindowsOptionalFeature -Online -FeatureName SmbDirect
TelnetClient Enable-WindowsOptionalFeature -Online -FeatureName TelnetClient
TFTP Enable-WindowsOptionalFeature -Online -FeatureName TFTP
TIFFIFilter Enable-WindowsOptionalFeature -Online -FeatureName TIFFIFilter
VirtualMachinePlatform Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform
WAS-ConfigurationAPI Enable-WindowsOptionalFeature -Online -FeatureName WAS-ConfigurationAPI
WAS-NetFxEnvironment Enable-WindowsOptionalFeature -Online -FeatureName WAS-NetFxEnvironment
WAS-ProcessModel Enable-WindowsOptionalFeature -Online -FeatureName WAS-ProcessModel
WAS-WindowsActivationService Enable-WindowsOptionalFeature -Online -FeatureName WAS-WindowsActivationService
WCF-HTTP-Activation Enable-WindowsOptionalFeature -Online -FeatureName WCF-HTTP-Activation
WCF-HTTP-Activation45 Enable-WindowsOptionalFeature -Online -FeatureName WCF-HTTP-Activation45
WCF-MSMQ-Activation45 Enable-WindowsOptionalFeature -Online -FeatureName WCF-MSMQ-Activation45
WCF-NonHTTP-Activation Enable-WindowsOptionalFeature -Online -FeatureName WCF-NonHTTP-Activation
WCF-Pipe-Activation45 Enable-WindowsOptionalFeature -Online -FeatureName WCF-Pipe-Activation45
WCF-Services45 Enable-WindowsOptionalFeature -Online -FeatureName WCF-Services45
WCF-TCP-Activation45 Enable-WindowsOptionalFeature -Online -FeatureName WCF-TCP-Activation45
WCF-TCP-PortSharing45 Enable-WindowsOptionalFeature -Online -FeatureName WCF-TCP-PortSharing45
Windows-Defender-ApplicationGuard Enable-WindowsOptionalFeature -Online -FeatureName Windows-Defender-ApplicationGuard
Windows-Defender-Default-Definitions Enable-WindowsOptionalFeature -Online -FeatureName Windows-Defender-Default-Definitions
Windows-Identity-Foundation Enable-WindowsOptionalFeature -Online -FeatureName Windows-Identity-Foundation
WindowsMediaPlayer Enable-WindowsOptionalFeature -Online -FeatureName WindowsMediaPlayer
WorkFolders-Client Enable-WindowsOptionalFeature -Online -FeatureName WorkFolders-Client

Use "Enable-WindowsOptionalFeature" to add features. Use "disable-WindowsOptionalFeature" to disable the feature.
if error message "can not read registry key" , the feature may not be supported by the version of Windows you are running.

Syntax is as follows.

 Get-WindowsOptionalFeature [-FeatureName <String>] [-PackageName <String>] [-PackagePath <String>] -Path <String> [-WindowsDirectory <String>] [-SystemDrive <String>] [-LogPath <String>] [-ScratchDirectory <String>] [-LogLevel <LogLevel>] [<CommonParameters>]


[back to top]