While running the SharePoint 2013 Product Preparation Tool on Windows Server 2012 I got this error:
There was an error during installation.
The tool was unable to install Application Server Role, Web Server (IIS) Role.
Application Server Role, Web Server (IIS) Role: configuration error.
You can simply fix this by installing .NET Framework 3.5 Features from Server Manager before running the Product Preparation Tool:
After this step make sure to specify the source location (by clicking Specify an alternate source path) of the installation files (usually D:\sources\sxs) because the source files for .NET Framework 3.5 are not copied to the harddrive during Windows setup.
Thanks so much for this, could NOT figure out why this was failing.