jueves, 12 de abril de 2018

SharePoint 2013 on Windows Server 2012 R2 : The tool was unable to install Application Server Role, Web Server (IIS) Role


Hi There, 

I spent hours to troubleshoot this issue while installing SharePoint 2013 Prerequisites on Windows Server 2012 R2 but no gain. I have installed IIS and its features manually but still did not work.

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


The Logs Shows Below

1. Error: Startup task doesn’t exist. This is not a continuation after a restart

2015-02-10 15:58:56 – C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\SharePointServerPreparationToolStartup_0FF1CE14-0000-0000-0000-000000000000.cmd
2015-02-10 15:58:56 – Error: Startup task doesn’t exist. This is not a continuation after a restart.
2015-02-10 15:58:56 – Locating the following command line arguments file:
2015-02-10 15:58:56 – E:\PrerequisiteInstaller.Arguments.txt

2. Error: [In HRESULT format] (-2147024894)

2015-10-02 15:59:02 – Created thread for installer
2015-10-02 15:59:02 – “C:\Windows\system32\ServerManagerCmd.exe” -inputpath “C:\Users\ADMINI~1\AppData\Local\Temp\PreB8C.tmp.XML”
2015-10-02 15:59:02 – Error: Unable to install (2)
2015-10-02 15:59:02 – Error: [In HRESULT format] (-2147024894)
2015-10-02 15:59:02 – Last return code (2)
2015-10-02 15:59:02 – Reading the following DWORD value/name…

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

SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired
2015-10-02 15:59:02 – Error: The tool was unable to install Application Server Role, Web Server (IIS) Role.
2015-10-02 15:59:02 – Last return code (2)
2015-10-02 15:59:02 – Options for further diagnostics: 1. Look up the return code value 2. Download the prerequisite manually and verify size downloaded by the prerequisite installer. 3. Install the prerequisite manually from the given location without any command line options.
2015-10-02 15:59:02 – Cannot retry


Things i have done which didn't helped actually.

1. Manually installed IIS and its Features
2. Manually enabled Framework 4.5 and 3.5 features
3. Edited Local Group Policy and ran the prerequisites installer but still didn't work

Solution:

A big thanks to my lead Mr. Shahid Sheraz for sitting beside me and showing this post that he wrote.

I found the same solution here too. Quick steps are below.

1. Go to C:\Windows\system32\ and locate file ServerManager.exe
2. Copy and rename the file with ServerManagerCmd.exe
3. Run the Prerequisites wizard again. 

Enjoy :)

Happy SharePointing...!