Enable IIS features via DISM

Although ‘code is poetry’ idiom is well known, for my usual readers this is a post that fits under the software category!

Otherwise for people who’ve been knocked about using ‘PkgMgr’ with an error of this sort: ‘Note: PkgMgr.exe has been deprecated. Please update your scripts to use DISM.exe to install, uninstall, configure and update features of and packages for Windows’, well below is an example of how to do it using PowerShell (on Windows 10 specifically):

Dism.exe /Online /Enable-Feature /FeatureName:IIS-WebServerRole `
/FeatureName:IIS-WebServer `
/FeatureName:IIS-NetFxExtensibility `
/FeatureName:IIS-NetFxExtensibility45 `
/FeatureName:IIS-ISAPIExtensions `
/FeatureName:IIS-ISAPIFilter `
/FeatureName:IIS-ASP `
/FeatureName:IIS-ASPNET `
/FeatureName:IIS-ASPNET45 `
/FeatureName:IIS-ApplicationInit

 

Help on this command was not available and ready, as we’ve come to expect from our beloved web, so after a bit of divide and conquer (and experimentation) I found the above to work. It enables the IIS and ASP features, along with .Net extensibility (3.5 and 4.5) as well as web Application Initialization (to keep your apps ready an willing).

Please share this command if you find it useful..

 

Advertisements

1 thought on “Enable IIS features via DISM”

  1. On Windows 7 it’ll be something like this:

    Dism.exe /Online /Enable-Feature /FeatureName:IIS-WebServerRole `
    /FeatureName:IIS-WebServer `
    /FeatureName:IIS-NetFxExtensibility `
    /FeatureName:IIS-ISAPIExtensions `
    /FeatureName:IIS-ISAPIFilter `
    /FeatureName:IIS-ASP `
    /FeatureName:IIS-ASPNET

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s