The tool was unable to install Application Server Role, Web Server (IIS) Role


  • when I install prerequisiteinstaller.exe in sharepoint 2013, got the below error:

    Error when enabling ASP.NET v4.0.30319

    Error: The tool was unable to install Application Server Role, Web Server (IIS) Role.

    Last return code (-2146646015)

    anyone can help this? thanks in advance.


    miércoles, 31 de octubre de 2012 7:02


  • fixxed. just run te command:

    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regii -enable -i


    • Marcado como respuesta Awen Hu viernes, 02 de noviembre de 2012 2:03
    viernes, 02 de noviembre de 2012 2:03

Todas las respuestas

  • Does the account you're logged in as belong to the "Local Administrators" group Awen?

    Have you tried adding the IIS Role via "Server Manager" > "Roles"

    Paul Turner Twitter: @RedMantaUK MCTS:WSS,MOSS,2010 MCITP:2010.
    Please remember to click "Propose As Answer" if a post solves your problem or "Vote As Helpful" if it was useful.

    miércoles, 31 de octubre de 2012 8:39
  • yes, it is.  added IIS role


    miércoles, 31 de octubre de 2012 9:44
  • fixxed. just run te command:

    C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regii -enable -i


    • Marcado como respuesta Awen Hu viernes, 02 de noviembre de 2012 2:03
    viernes, 02 de noviembre de 2012 2:03
  • I am facing the same issue..I have tried following things,

    1.Added IIS Roles

    2. Run aspnet_regii -enable -i

    2. Install Windows Features for SharePoint manually using Powershell( as suggested in

    But still it's giving the same error.

    Any clues?


    viernes, 28 de diciembre de 2012 6:50
  • Create two roles one for "Application server" and "Web server (IIS)" in Server manager.

    Below are the links for creation in case of windows server 2012-

    I faced the same issue and followed the above links for creation and later tool ran successfully.

    martes, 26 de febrero de 2013 9:09
  • Thanks a lot, this command working.

    i hope my issue has been resolved.

    miércoles, 13 de marzo de 2013 8:44
  • Hi,

    This issue has been addressed by following knowledge based article

    There are three or four sections to this document, for me following section did the trick.


    1. Offline method: Server is not connected to the Internet

      To install the Roles and Features that are required by SharePoint 2013 on Windows Server 2012 in an offline environment, you must have access to the Windows Server 2012 installation media. You can then run the same Windows PowerShell commands that you used in Method 2, but you must use the -source parameter to specify the location of the required files on the installation media.

      For example, assume that you mounted the Windows Server 2012 installation media (ISO) to drive D of the server. Then, the path to provide for the -source parameter is as follows:

      Note Be aware that you can also copy the files locally or specify a UNC path where the installation files are stored.

      Open an elevated Windows PowerShell prompt on the SharePoint server (that is, Run as Administrator), and execute the following commands:
      Import-Module ServerManager
      Add-WindowsFeature NET-WCF-HTTP-Activation45,NET-WCF-TCP-Activation45,NET-WCF-Pipe-Activation45
      Add-WindowsFeature Net-Framework-Features,Web-Server,Web-WebServer,Web-Common-Http,Web-Static-Content,Web-Default-Doc,Web-Dir-Browsing,Web-Http-Errors,Web-App-Dev,Web-Asp-Net,Web-Net-Ext,Web-ISAPI-Ext,Web-ISAPI-Filter,Web-Health,Web-Http-Logging,Web-Log-Libraries,Web-Request-Monitor,Web-Http-Tracing,Web-Security,Web-Basic-Auth,Web-Windows-Auth,Web-Filtering,Web-Digest-Auth,Web-Performance,Web-Stat-Compression,Web-Dyn-Compression,Web-Mgmt-Tools,Web-Mgmt-Console,Web-Mgmt-Compat,Web-Metabase,Application-Server,AS-Web-Support,AS-TCP-Port-Sharing,AS-WAS-Support, AS-HTTP-Activation,AS-TCP-Activation,AS-Named-Pipes,AS-Net-Framework,WAS,WAS-Process-Model,WAS-NET-Environment,WAS-Config-APIs,Web-Lgcy-Scripting,Windows-Identity-Foundation,Server-Media-Foundation,Xps-Viewer <var>-Source D:\Sources\sxs</var>

      Your server will require a restart after you run this Windows PowerShell code.
    2. Install the other prerequisites that are required by SharePoint 2013.
    3. Run the Products Preparation Tool - PrerequisiteInstaller.exe again. "

    • Editado Mandeep G viernes, 03 de mayo de 2013 2:06
    • Propuesto como respuesta sstyhoo martes, 24 de septiembre de 2013 10:42
    viernes, 03 de mayo de 2013 2:05
  • After hours spent trying to figure this out, I tracked it down to the prereq installer and SharePoint not installing due to systemmangercmd.exe not being present in the system32 folder and thus not being able to run the step for the Roles.

    The blog post here will show you how to get the missing files and where to upload them. You will probably need to modify the folder security on the System32 to modify and add folders.

    Once the file was in place both prereq installer and full installer worked correctly.

    • Propuesto como respuesta Joachim Løe martes, 03 de diciembre de 2013 19:33
    viernes, 24 de mayo de 2013 15:43
  • Hi there,

    In my case it had to be aspnet_regiis -enable -i

    because without the s never ran.


    Big ups to you folks

    jueves, 27 de junio de 2013 13:09
  • This worked in my case. Thanks :)
    jueves, 28 de noviembre de 2013 13:22
  • Worked on Server 2012 R2. Yet its not supported. But to get it installed, it worked. Thanks

    Joachim Løe | Crayon AS | MCITP: Enterprise Messaging Administrator 2010 / Lync Administrator 2010 / MCSA 2012

    martes, 03 de diciembre de 2013 19:33
  • Thx a lot. I just copied/pasted the ServerManagementCMD.exe to the System32 forlder and the prerequisites worked great.
    domingo, 30 de marzo de 2014 17:34
  • rename the file C:\windows\System32\ServerManager.exe with ServerManagerCMD.exe

    then run prerequisiteinstaller

    lunes, 31 de marzo de 2014 8:39
  • I copied and then renamed, this also fixed my issue.  "rename the file C:\windows\System32\ServerManager.exe with ServerManagerCMD.exe"

    • Propuesto como respuesta JV_SubtleTech miércoles, 16 de abril de 2014 6:11
    martes, 01 de abril de 2014 19:27
  • Thanks , its working for me.
    viernes, 11 de abril de 2014 12:22
  • Thanks a lot, it worked for me.
    martes, 15 de abril de 2014 10:45
  • The option to make a copy and then rename the file is a much better solution than simply renaming the file.  This will ensure that anything else looking for the old version can find it (since it's an exe file and not a DLL).
    miércoles, 16 de abril de 2014 6:13
  • To solve the issue I set the following Local Policy:

    1. – Windows Start

    2. – run MMC

    3. – Click File, Add/Remove Snap-in…

    4. – Select Group Policy Object Editor and ADD it

    5. – Navigate to Administrative templates / System

    6. – Select and edit “Specify Settings for optional component installation and component repair”

    7. – Enable and select “Contract Windows Update directly to download repair content instead of Windows Server Update Services (WSUS)”

    viernes, 18 de abril de 2014 7:57