Enable a single feature using DISM (Windows 7) RRS feed

  • Question

  • I'm trying to enable Windows feature "IIS Management Console" on Windows 7 workstation. I need only this feature in order to remotely connect to an IIS server. If I use the "Turn Windows features or or off" GUI in Control Panel I can navigate to "Internet information services", then "Web Management Tools" and then select the "IIS Management Conlsole". After clicking OK I get exactly what I want - just that feature and nothing else:

    However I need to automate this for many workstations so I decided to use DISM. First I tried the following command:

    dism /online /enable-feature /featurename:IIS-ManagementConsole

    It comes back with the following error:

    The operation completed but IIS-ManagementConsole feature was not enabled.
    Ensure that the following parent feature(s) are enabled first. If they are already enabled, refer to the lo
    g file for further diagnostics.
    IIS-WebServerManagementTools, IIS-WebServerRole

    Then I tried this:

    dism /online /enable-feature /featurename:IIS-ManagementConsole /all

    which is supposed to automatically enable missing parent features, but I get the following error:

    Error: 87
    The all option is not recognized in this context.
    For more information, refer to the help.
    Finally, I tried to manually enable the two missing features first:

    dism /online /enable-feature /featurename:IIS-WebServerRole dism /online /enable-feature /featurename:IIS-WebServerManagementTools dism /online /enable-feature /featurename:IIS-ManagementConsole

    This works and as a result I get the "IIS Management Conlsole" feature, but I also get the entire "World Wide Web Services" feature along with a bunch of sub-features:

    I definitely don't want Web Services on the workstations so I then use this to disable them:

    dism /online /disable-feature /featurename:IIS-WebServer


    Finally I get what I want - "IIS Management Conlsole" feature only - same as if using the GUI, but with much more unnecessary steps. Addition inconvenience is that after the disable-feature command I am getting asked to "restart Windows to complete this operation", which again doesn't happen if I use the GUI.

    What will be the way to enable just that one feature via a command prompt without having to go through unnecessary enabling/disabling of other features and restarts?

    • Edited by Stfn74 Tuesday, January 3, 2017 10:14 PM Typo
    Tuesday, January 3, 2017 10:01 PM