IIS 7.5 scripted install fails when trying to add MicrosoftWindowsPowerShell feature

Posted on 2011-10-20
Last Modified: 2013-02-28
Hi all -

Hoping for some help here. Just getting started with IIS 7.5 and trying to get a script working. The script came from the Microsoft web site as such:

CMD /C Start /w PKGMGR.EXE /l:log.etw /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-HttpRedirect;IIS-ApplicationDevelopment;IIS-ASP;IIS-CGI;IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-ServerSideIncludes;IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-HttpTracing;IIS-CustomLogging;IIS-ODBCLogging;IIS-Security;IIS-BasicAuthentication;IIS-WindowsAuthentication;IIS-DigestAuthentication;IIS-ClientCertificateMappingAuthentication;IIS-IISCertificateMappingAuthentication;IIS-URLAuthorization;IIS-RequestFiltering;IIS-IPSecurity;IIS-Performance;IIS-HttpCompressionStatic;IIS-HttpCompressionDynamic;IIS-WebServerManagementTools;IIS-ManagementScriptingTools;IIS-IIS6ManagementCompatibility;IIS-Metabase;IIS-WMICompatibility;IIS-LegacyScripts;WAS-WindowsActivationService;WAS-ProcessModel;IIS-FTPServer;IIS-FTPSvc;IIS-FTPExtensibility;IIS-WebDAV;IIS-ASPNET;IIS-NetFxExtensibility;WAS-NetFxEnvironment;WAS-ConfigurationAPI;IIS-ManagementService;MicrosoftWindowsPowerShell


This block of code fails, yet it's as-is from Microsoft's web site. If I remove the trailing ";MicrosoftWindowsPowerShell" at the end of the script, it works beautifully.

I found another method of installing just the PowerShell add-in via dism at:

The first line of code to execute fails as well:
dism /Online /Enable-Feature /FeatureName:MicrosoftWindowsPowerShell

The returned error is:
Error 0x800f080c
Feature name MicrosoftWindowsPowerShell is unknown.
A Windows feature name was not recognized.

I'm confused since I'm doing this verbatim from the example. Can someone point out what I'm doing wrong?

Question by:JLankford
    LVL 6

    Expert Comment

    Please provide more information:
    1. What is the exact Windows OS ?
    2. run the following command and attach the output:
    DISM /online /get-features /format:table

    Please note that because Windows PowerShell is built on Microsoft .NET Framework, Microsoft .Net Framework must be installed correctly first for a successful Windows PowerShell installation.

    Author Comment

    OS is Windows Server 2008 R2 Enterprise. I didn't perform an installation of PowerShell on this new platform; v2 was installed by default. I checked this by running a quick script to show me the version just to verify.

    I have attached the code as requested.

    Deployment Image Servicing and Management tool
    Version: 6.1.7600.16385
    Image Version: 6.1.7600.16385
    Features listing for package : Microsoft-Windows-Foundation-Package~31bf3856ad364e35~amd64~~6.1.7601.17514
    ----------------------------------------------------------- | --------
    Feature Name                                                | State   
    ----------------------------------------------------------- | --------
    DirectoryServices-DomainController-Tools                    | Disabled
    IIS-WebServerRole                                           | Enabled 
    IIS-WebServer                                               | Enabled 
    IIS-CommonHttpFeatures                                      | Enabled 
    IIS-HttpErrors                                              | Enabled 
    IIS-HttpRedirect                                            | Enabled 
    IIS-ApplicationDevelopment                                  | Enabled 
    IIS-Security                                                | Enabled 
    IIS-URLAuthorization                                        | Enabled 
    IIS-RequestFiltering                                        | Enabled 
    IIS-NetFxExtensibility                                      | Enabled 
    IIS-HealthAndDiagnostics                                    | Enabled 
    IIS-HttpLogging                                             | Enabled 
    IIS-LoggingLibraries                                        | Enabled 
    IIS-RequestMonitor                                          | Enabled 
    IIS-HttpTracing                                             | Enabled 
    IIS-IPSecurity                                              | Enabled 
    IIS-Performance                                             | Enabled 
    IIS-HttpCompressionDynamic                                  | Enabled 
    IIS-WebServerManagementTools                                | Enabled 
    IIS-ManagementScriptingTools                                | Enabled 
    IIS-IIS6ManagementCompatibility                             | Enabled 
    IIS-Metabase                                                | Enabled 
    WAS-WindowsActivationService                                | Enabled 
    WAS-ProcessModel                                            | Enabled 
    WAS-NetFxEnvironment                                        | Enabled 
    WAS-ConfigurationAPI                                        | Enabled 
    IIS-HostableWebCore                                         | Disabled
    IIS-ISAPIExtensions                                         | Enabled 
    IIS-ISAPIFilter                                             | Enabled 
    IIS-StaticContent                                           | Enabled 
    IIS-DefaultDocument                                         | Enabled 
    IIS-DirectoryBrowsing                                       | Enabled 
    IIS-WebDAV                                                  | Enabled 
    IIS-ASPNET                                                  | Enabled 
    IIS-ASP                                                     | Enabled 
    IIS-CGI                                                     | Enabled 
    IIS-ServerSideIncludes                                      | Enabled 
    IIS-CustomLogging                                           | Enabled 
    IIS-BasicAuthentication                                     | Enabled 
    IIS-HttpCompressionStatic                                   | Enabled 
    IIS-ManagementConsole                                       | Enabled 
    IIS-ManagementService                                       | Enabled 
    IIS-WMICompatibility                                        | Enabled 
    IIS-LegacyScripts                                           | Enabled 
    IIS-LegacySnapIn                                            | Disabled
    IIS-FTPServer                                               | Enabled 
    IIS-FTPSvc                                                  | Enabled 
    IIS-FTPExtensibility                                        | Enabled 
    Smtpsvc-Admin-Update-Name                                   | Disabled
    Smtpsvc-Service-Update-Name                                 | Disabled
    NetFx3                                                      | Disabled
    WCF-HTTP-Activation                                         | Disabled
    WCF-NonHTTP-Activation                                      | Disabled
    DirectoryServices-DomainController                          | Disabled
    DirectoryServices-ADAM                                      | Disabled
    OEMHelpCustomization                                        | Disabled
    CorporationHelpCustomization                                | Disabled
    Printing-LPRPortMonitor                                     | Disabled
    Printing-InternetPrinting-Client                            | Disabled
    Printing-AdminTools-Collection                              | Disabled
    BitLocker                                                   | Disabled
    BitLocker-RemoteAdminTool                                   | Disabled
    BdeAducExtTool                                              | Disabled
    SimpleTCP                                                   | Disabled
    SNMP                                                        | Disabled
    WMISnmpProvider                                             | Disabled
    Microsoft-Windows-Web-Services-for-Management-IIS-Extension | Disabled
    LightweightServer                                           | Disabled
    MicrosoftWindowsPowerShellISE                               | Disabled
    RemoteAssistance                                            | Disabled
    WSRM                                                        | Disabled
    TelnetServer                                                | Disabled
    TelnetClient                                                | Disabled
    BiometricFramework                                          | Disabled
    IIS-WindowsAuthentication                                   | Enabled 
    IIS-DigestAuthentication                                    | Enabled 
    IIS-ClientCertificateMappingAuthentication                  | Enabled 
    IIS-IISCertificateMappingAuthentication                     | Enabled 
    IIS-ODBCLogging                                             | Enabled 
    Printing-Server-Role                                        | Disabled
    Printing-LPDPrintService                                    | Disabled
    BusScan-ScanServer                                          | Disabled
    Printing-InternetPrinting-Server                            | Disabled
    FaxServiceConfigRole                                        | Disabled
    FaxServiceRole                                              | Disabled
    DFSR-Infrastructure-ServerEdition                           | Disabled
    DHCPServer                                                  | Disabled
    DHCPServer-Tools                                            | Disabled
    DHCPServer-RSATClient-Tools                                 | Disabled
    NetworkLoadBalancingFullServer                              | Disabled
    FailoverCluster-FullServer                                  | Disabled
    NetworkLoadBalancingManagementClient                        | Disabled
    FailoverCluster-AdminPak                                    | Disabled
    InkSupport                                                  | Disabled
    DesktopExperience                                           | Disabled
    HandwritingRecognition                                      | Disabled
    AppServer                                                   | Disabled
    AppServer-UI                                                | Disabled
    Licensing                                                   | Disabled
    Licensing-UI                                                | Disabled
    SessionDirectory                                            | Disabled
    SBMgr-UI                                                    | Disabled
    WebAccess                                                   | Disabled
    SUA                                                         | Disabled
    Microsoft-Windows-Deployment-Services                       | Disabled
    Microsoft-Windows-Deployment-Services-Transport-Server      | Disabled
    Microsoft-Windows-Deployment-Services-Deployment-Server     | Disabled
    Microsoft-Windows-Deployment-Services-Legacy-SIS            | Disabled
    Microsoft-Windows-Deployment-Services-Admin-Pack            | Disabled
    ActiveDirectory-PowerShell                                  | Disabled
    DirectoryServices-AdministrativeCenter                      | Disabled
    DNS-Server-Full-Role                                        | Disabled
    DirectoryServices-ADAM-Tools                                | Disabled
    DNS-Server-Tools                                            | Disabled
    WINSRuntime                                                 | Disabled
    Microsoft-Windows-Internet-Naming-Service-AdminTools        | Disabled
    IAS NT Service                                              | Disabled
    HCSRuntime                                                  | Disabled
    HCSUI                                                       | Disabled
    RPC-HTTP_Proxy                                              | Disabled
    Gateway                                                     | Disabled
    Gateway-UI                                                  | Disabled
    NPSManagementTools                                          | Disabled
    HCAP-Server                                                 | Disabled
    RasServer                                                   | Disabled
    RasServerAdminTools                                         | Disabled
    RasServerAll                                                | Disabled
    RasRoutingProtocols                                         | Disabled
    RasCMAK                                                     | Disabled
    AdminUI                                                     | Disabled
    NIS                                                         | Disabled
    RSAT-NIS                                                    | Disabled
    PSync                                                       | Disabled
    WirelessNetworking                                          | Disabled
    WindowsRecoveryDisc                                         | Disabled
    WindowsServerBackup                                         | Disabled
    WindowsServerBackupCommandlet                               | Disabled
    ServicesForNFS-ServerAndClient                              | Disabled
    ServerForNFS-Infrastructure                                 | Disabled
    ClientForNFS-Infrastructure                                 | Disabled
    NFS-Administration                                          | Disabled
    DFS-Replication-All                                         | Disabled
    DfsMgmt                                                     | Disabled
    FSRM-Infrastructure                                         | Disabled
    FSRM-Management                                             | Disabled
    CoreFileServer                                              | Disabled
    BITSExtensions-Upload                                       | Disabled
    BITSExtensions-AdminPack                                    | Disabled
    MSRDC-Infrastructure                                        | Disabled
    FRS-Infrastructure                                          | Disabled
    StorageManagerForSANs                                       | Disabled
    Indexing-Service-Package                                    | Disabled
    iSNS_Service                                                | Disabled
    Microsoft-Windows-GroupPolicy-ServerAdminTools-Update       | Disabled
    TFTP                                                        | Disabled
    MultipathIo                                                 | Disabled
    DirectoryServices-ISM-Smtp                                  | Disabled
    SearchEngine-Server-Package                                 | Disabled
    CertificateServicesManagementTools                          | Disabled
    CertificateServices                                         | Disabled
    OnlineRevocationServicesManagementTools                     | Disabled
    OnlineRevocationServices                                    | Disabled
    WebEnrollmentServices                                       | Disabled
    NetworkDeviceEnrollmentServices                             | Disabled
    CertificateEnrollmentPolicyServer                           | Disabled
    CertificateEnrollmentServer                                 | Disabled
    P2P-PnrpOnly                                                | Disabled
    MSMQ-Server                                                 | Disabled
    MSMQ-Triggers                                               | Disabled
    MSMQ-ADIntegration                                          | Disabled
    MSMQ-HTTP                                                   | Disabled
    MSMQ-Multicast                                              | Disabled
    MSMQ-DCOMProxy                                              | Disabled
    MSMQ-RoutingServer                                          | Disabled
    Printing-XPSServices-Features                               | Enabled 
    DFSN-Server                                                 | Disabled
    ADFS-FederationService                                      | Disabled
    ADFS-FederationServiceProxy                                 | Disabled
    ADFS-WebAgentClaims                                         | Disabled
    ADFS-WebAgentToken                                          | Disabled
    RightsManagementServices                                    | Disabled
    RMS-Federation                                              | Disabled
    RightsManagementServices-AdminTools                         | Disabled
    QWAVE                                                       | Disabled
    PeerDist                                                    | Disabled
    SIS-Limited                                                 | Disabled
    Microsoft-Hyper-V                                           | Disabled
    VmHostAgent                                                 | Disabled
    Microsoft-Hyper-V-Management-Clients                        | Disabled
    DamgmtTools                                                 | Disabled
    SMBHashGeneration                                           | Disabled
    ServerMigration                                             | Disabled
    Xps-Foundation-Xps-Viewer                                   | Disabled
    TIFFIFilter                                                 | Disabled
    Microsoft-Windows-RemoteFX-Host-Package                     | Disabled
    Microsoft-Windows-RemoteFX-EmbeddedVideoCap-Setup-Package   | Disabled
    Internet-Explorer-Optional-amd64                            | Enabled 
    The operation completed successfully.

    Open in new window

    LVL 6

    Expert Comment

    I would like to refer you to the following Microsoft Support article

    Author Comment

    That article basically points to steps I've already tried via a different MS article.

    For method 1: SCONFIG apparently doesn't exist on my platform, for which I'm guessing that's a Windows Server Core app, and I'm not running server core.

    For method 2: I've already tried running DISM.exe /online /enable-feature /featurename:MicrosoftWindowsPowerShell, but the return command says this feature doesn't exist. I did however, find that there is a feature called MicrosoftWindowsPowershellISE, but I'm not sure what that is.

    Bottom line is I'm still confused why this isn't working OOTB like the instructions for installing it suggest?

    Any other ideas?

    LVL 9

    Accepted Solution

    you have the wrong name of the feature,
    the correct name is MicrosoftWindowsPowerShellISE

    Author Comment

    Oh ok. I have since changed jobs since posting this question so I'm not using 2008 R2 platforms as much but I will try to test this ASAP.

    Thanks for the update!


    Author Comment

    I had a new server to install today with IIS7.5 and executed the script with the updated Feature name and it worked beautifully. Thanks!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Set OWA language and time zone in Exchange for individuals, all users or per database.
    Create and license users in Office 365 in bulk based on a CSV file. A step-by-step guide with PowerShell script examples.
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now