Skip to content

Instantly share code, notes, and snippets.

@brlinton
Last active June 28, 2021 13:18
Show Gist options
  • Save brlinton/af0c67b047b7bc1f9f94 to your computer and use it in GitHub Desktop.
Save brlinton/af0c67b047b7bc1f9f94 to your computer and use it in GitHub Desktop.
Enable IIS tools form the command line
# Remove the /all if you receive any errors
& dism /online /get-features | more
& dism /online /enable-feature /FeatureName:IIS-CertProvider /all
& dism /online /enable-feature /FeatureName:IIS-WindowsAuthentication /all
& dism /online /enable-feature /FeatureName:IIS-ClientCertificateMappingAuthentication /all
& dism /online /enable-feature /FeatureName:IIS-StaticContent /all
& dism /online /enable-feature /FeatureName:IIS-DefaultDocument /all
& dism /online /enable-feature /FeatureName:IIS-WebSockets /all
& dism /online /enable-feature /FeatureName:IIS-ASPNET /all
& dism /online /enable-feature /FeatureName:IIS-ASPNET45 /all
& dism /online /enable-feature /FeatureName:IIS-BasicAuthentication /all
& dism /online /enable-feature /FeatureName:IIS-ManagementService /all
& dism /online /enable-feature /FeatureName:IIS-HttpCompressionStatic /all
& dism /online /enable-feature /FeatureName:IIS-HostableWebCore /all
& dism /online /enable-feature /FeatureName:IIS-WebServerManagementTools /all
& dism /online /enable-feature /FeatureName:IIS-ManagementScriptingTools /all
@ibrown-kmx
Copy link

ibrown-kmx commented Oct 26, 2017

I had to enable the following features as prerequisites:

& dism /online /enable-feature /FeatureName:IIS-WebServerRole
& dism /online /enable-feature /FeatureName:IIS-WebServer
& dism /online /enable-feature /FeatureName:IIS-Security

& dism /online /enable-feature /FeatureName:IIS-NetFxExtensibility
& dism /online /enable-feature /FeatureName:IIS-ISAPIExtensions
& dism /online /enable-feature /FeatureName:IIS-ISAPIFilter

I also got the following errors (running Windows 7, Visual Studio 2017, .Net Framework 4.6.1):

Error: 0x800f080c
Feature name IIS-CertProvider is unknown.
A Windows feature name was not recognized.
Use the /Get-Features option to find the name of the feature in the image and try the command again.

Error: 0x800f080c
Feature name IIS-WebSockets is unknown.
A Windows feature name was not recognized.
Use the /Get-Features option to find the name of the feature in the image and try the command again.

Error: 0x800f080c
Feature name IIS-ASPNET45 is unknown.
A Windows feature name was not recognized.
Use the /Get-Features option to find the name of the feature in the image and try the command again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment