I get asked about installing SharePoint 2013 on Server 2012 R2 quite frequently, in fact it cropped up twice this week alone! Let’s clear up the most common question “is SharePoint 2013 supported on Server 2012 R2?”. Yes, providing you are using SharePoint 2013 SP1 (or later). Although it is possible to install pre-SP1 on 2012 R2, I would not recommend doing so in a Production environment – save that for labs! The full description of support for SharePoint 2013 on Server 2012 R2 can be found here: http://support.microsoft.com/en-us/kb/2891274.

Now, if you’ve attempted to jump straight into a fresh Server 2012 R2 OSE build and fire up the SharePoint pre-requisite installer (either online or offline), you will most likely have hit the “IIS Role” error:

Failed while processing command enable-feature. - CPackageManagerCLIHandler::ExecuteCmdLine(hr:0x800f081f)

This is easy enough to resolve, although very common I’m surprised to see few people in the community talking about it. Anyway, you don’t care about that, you want a fix, right? First of all, mount the Server 2012 R2 installation media, or copy the “sxs” folder to a temporary location on the target server. Now open an elevated PowerShell prompt and execute the following cmdlets:

# Copy WinSXS from Server 2012 R2 media and update $source accordingly
 $source = "D:sxs";
 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,NET-HTTP-Activation -Source $source;

About the author