Friday 7 December 2012

Error in SharePoint Server 2013 Prerequisite Installer on Windows Server 2012 - Unable to Install Application Server and Web Server (IIS) Role

When trying to install SharePoint Server 2013 RTM on a fresh new Windows Server 2012 RTM OS, in a farm with SQL Server running on a seperate VM I hit a bit of grief getting past the prerequisite installer a.k.a Microsoft SharePoint 2013 Product Preparation Tool.

One of the first steps it gets through is to add the Application Server and Web Server (IIS) Roles. This is where it seemed to be failing, below is an output of the prerequisite installer logs.


2012-11-20 13:15:12 - Request for install time of Application Server Role, Web Server (IIS) Role
2012-11-20 13:15:13 - Request for install time of Application Server Role, Web Server (IIS) Role
2012-11-20 13:15:13 - Install process returned (0)
2012-11-20 13:15:13 - [In HRESULT format] (0)
2012-11-20 13:15:13 - "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe" -i
2012-11-20 13:15:13 - Install process returned (0)
2012-11-20 13:15:13 - [In HRESULT format] (0)
2012-11-20 13:15:13 - "C:\Windows\system32\cscript.exe" "C:\Windows\system32\iisext.vbs" /enext "ASP.NET v4.0.30319"
2012-11-20 13:15:14 - Install process returned (1)
2012-11-20 13:15:14 - [In HRESULT format] (-2147024895)
2012-11-20 13:15:14 - Error when enabling ASP.NET v4.0.30319
2012-11-20 13:15:14 - Last return code (1)
2012-11-20 13:15:14 - Reading the following DWORD value/name...
2012-11-20 13:15:14 - Flags
2012-11-20 13:15:14 - from the following registry location...
2012-11-20 13:15:14 - SOFTWARE\Microsoft\Updates\UpdateExeVolatile
2012-11-20 13:15:14 - Reading the following string value/name...
2012-11-20 13:15:14 - PendingFileRenameOperations
2012-11-20 13:15:14 - from the following registry location...
2012-11-20 13:15:14 - SYSTEM\CurrentControlSet\Control\Session Manager
2012-11-20 13:15:14 - Reading the following registry location...
2012-11-20 13:15:14 - SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto
Update\RebootRequired
2012-11-20 13:15:14 - Error: The tool was unable to install Application Server
Role, Web Server (IIS) Role.
2012-11-20 13:15:14 - Last return code (1)
2012-11-20 13:15:14 - 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.
2012-11-20 13:15:14 - Cannot retry

Noooooooooooooooo!

The errors start at this line:
2012-11-20 13:15:13 - "C:\Windows\system32\cscript.exe" "C:\Windows\system32\iisext.vbs" /enext "ASP.NET v4.0.30319"

So I went in and had a look in the C:\Windows\system32\ folder and THERE WAS NO iisext.vbs file in there at all.

Prerequisite installer, why are you trying to us a file that isn't there?
More importantly - wtf is meant to put that file there? 

iisext.vbs is an IIS Web service extension script which configures and manages Web service extension.

To get this file in there, go to Server Manager and start the Add Roles and Features wizard.

You need to ensure you add:

.NET Framework 3.5 - I hit issues with adding this via the wizard and had to use this approach: http://sharepoint-sezai-moss-2007.blogspot.com.au/2012/12/install-net-framework-35-bug-on-windows.html

IIS 6.0 - Ensure IIS 6.0 Scripting Tools is checked.



Optionally I recommend adding the SMTP Server, if you're going to need to get incoming email working in your farm, you're gonna need this guy too. If you tick SMTP Server, you get a dialog that states it's dependency on everything IIS 6, including the IIS 6 Management Console that isn't ticked in the screenshot above.

After you add those features, rerun the prerequisite installer and ...

2012-11-20 14:04:48 - "C:\Windows\system32\cscript.exe" "C:\Windows\system32\iisext.vbs" /enext "ASP.NET v4.0.30319"
2012-11-20 14:04:48 - Install process returned (0)

Remember that - 
 Install process returned (0) is good
and
 Install process returned (1) is BAD

So now the application server and web server (IIS) roles will install successfully and the prerequisite installer can now continue and install everything else it needs to.

You probably won't hit this issue with installing on Windows Server 2008 R2, you get it with Windows Server 2012 as .NET Framework 3.5 and IIS 6 bits aren't on their by default...

[Update] Check out this KB http://support.microsoft.com/kb/2765260
Install Windows Features for SharePoint manually. To do this, run the following commands in an elevated Windows PowerShell Command Prompt window:


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

8 comments:

Unknown said...
This comment has been removed by a blog administrator.
StefanoV12 said...

thanks thanks thanks! finally able to start the installation of the prerequisites

Andy said...

just installing .NET framework 3.5 first did work in my case

theVMdude said...

You're my Hero! I just spent the whole morning scratching my head on this one, and now finally got it working thanks to this article.

Unknown said...

You saved me a lot of time - so much appreciated that you posted this!

Anonymous said...

Didnt work in my case too, but i manage to solve it following this Article

Mikhail Pushin said...

Thanks a lot Sezai, intslation of the .NET 3.5 Framework did the trick for me!

Phil Hemingway said...

I get "A positional parameter cannot be found that accepts argument 'Add-WindowsFeature' when I try to run what you provided.

I've already installed IIS and Application roles manually and I'm still getting the error message in my wizard.