The tool was unable to install Web Server (IIS) Role – SharePoint 2016 on Windows Server 2016

The tool was unable to install Web Server (IIS) Role – SharePoint 2016 on Windows Server 2016

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.

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

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.

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.

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

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 :

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!

5/5 (12)

Please rate this

 
Comments

Thanks Vlad. The article helped me a lot.

Mattias Vannergård

Thanks!
Exactly the same was needed for SharePoint 2013 on Windows Server 2016.

installation progress stuck at 24% now, but i just hope it works. Thanks tho

Did yours ever finish? Mine seems to be stuck at 24% too. ~25 minutes

Thanks, This works on SharePoint 2019 too.

Yes. It worked on SharePoint 2019 too.

Worked like a charm! Thanks

Great info here. Thanks for posting.

Leave a Reply