While I was doing a SharePoint 2016 install at a customer, I got hit by the The tool was unable to install Web Server (IIS) Role error when trying to install the SharePoint 2016 prerequisites on a Windows Server 2016.
I know back in SharePoint 2013 this happened a lot, and there was a support article for it called The Products Preparation Tool in SharePoint Server 2013 may not progress past “Configuring Application Server Role, Web Server (IIS) Role”. This article gave us the following PowerShell cmdlets to run, that would basically install some of the features and roles that SharePoint Needs.
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
When trying to run this on Windows Server 2016, we get this error: Add-WindowsFeature : ArgumentNotValid: The role, role service, or feature name is not valid: ‘Application-Server,AS-Web-Support,AS-TCP-Port-Sharing,AS-WAS-Support,AS-HTTP-Activation,AS-TCP-Activation,AS-Named-Pipes,AS-Net-Framework’. The name was not found.
That is because the Application-Server role has actually been deprecated from Windows Server 2016. Some of its features have been added to the WAS role. The correct cmdlet you need to run for a Windows Server 2016 installation is :
Import-Module ServerManager 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,WAS,WAS-Process-Model,WAS-NET-Environment,WAS-Config-APIs,Web-Lgcy-Scripting,Windows-Identity-Foundation,Server-Media-Foundation,Xps-Viewer –Source D:\sources\sxs
And make sure to replace the D:\sources\sxs to the actual path of your sources file. The sources file is on your Windows Server 2016 installation media, and you need to specify it and have it mounted on your computer (or copied somewhere) for the prerequisite install to work properly! Everything should work properly afterwards to run the prerequisite installer! In theory, a reboot is not needed, but I always prefer to do one after activating that many features just in case!
The post The tool was unable to install Web Server (IIS) Role – SharePoint 2016 on Windows Server 2016 appeared first on Absolute SharePoint Blog by Vlad Catrinescu.
by Vlad Catrinescu via Absolute SharePoint Blog by Vlad Catrinescu
No comments:
Post a Comment