Context
Have you ever had a recurring IIS installation error or similar when installing SharePoint prerequisites with the dedicated tool?
Sometimes SharePoint farms we are setting up do not have access to the internet. This will be less and less the case because SharePoint has a growing services number needing access to the internet to work properly.
In addition your system admins and/or virtualization admins can exclude installation sources from machines they provide to you. The main reason for doing this is to save some storage space. As a reminder, when Windows Server is installing roles or features, it accesses to a local partial copy of installation media in order to get needed files.
Problematic
When SharePoint prerequisites installer prepares the environment for you it need to have access to the internet and to the local copy of installation sources (default installation of windows). If this is not the case the installation will fail.
Solutions
Required component for SharePoint
The solution is very simple. We just have to include installation sources for required component (understand the ones not in Windows Server roles or features) in our SharePoint installation source. I already treated this subject a couple of years ago for SharePoint 2010 here industrialisation-des-installa-2011-07-06-16-42-00
Required roles and features for SharePoint
For roles and features, it is a little bit more complicated when installation sources are not available on the machine.
You can install these manually but it gets boring when you have to install environments pretty often.
Proposed solution
I found an interesting solution. Microsoft has recently publish installation scripts for required components and roles and features. The advantage is you can integrate these scripts to your homemade scripts.
Solution is simple:
Insert Windows Server installation media.
Run script 1 specifying installation media location.
Run script 2 on your workstation to download prerequisites (warning: it only downloads English ones, you can adapt it if you need to).
Run script 3 on servers specifying required components setup files location. (UNC or copy it)
This solution is only on between many others, it will allow you to optimize your SharePoint installations and to save time. You can also improve this solution with other homemade or generic scripts like auto SP installer for installing and configuring SharePoint.
Another solution would be to install everything (prerequisites + SharePoint binairies) on one machine and then sysprep it, duplicate it and then begin farm’s configuration. But you cannot always use that solution especially if you are working for multiple clients.
And what about you? What solution did you find?