deployment, PoshUtils, PowerShell, Scripting, Sharepoint, SharePoint2013
Leave a comment

PoshUtils: Downloading SharePoint 2013 prerequisites for offline install

Okay, this is yet another post on downloading the SharePoint 2013 prerequisites for offline install. I am sure you have seen many and everyone has their own way. But I think none of those posts/scripts – at least the ones I read – don’t give you a unified way to download the prerequisites for all combinations of Windows Server OS and SQL Server versions.

So, here is my take. The idea of this script is to use the features of PowerShell 3.0 such as Out-GridView and default parameter values to reduce the amount of code required.

Note: The list of prerequisites I compiled here is what I perceived looking at technet documentation. Do let me know if I missed out anything or need to change something here.

Let us see the code first.

In the above code, I am using a CSV file I compiled with all the SharePoint 2013 prerequisite information. This is the key here. You can download the CSV file here. Instead of a hash, I preferred to use a CSV file as it not only reduces the number of lines of code but it also helps me keep it clean and make it easier to perform updates.

Once you have the CSV file, copy the above script to a .PS1 file and save it at the same location as the CSV. Now, follow these steps:

1. Dot source the PS1 file

2. Use the Get-SPPrerequisite function and the -list parameter to get a list of all SharePoint 2013 prerequisites.

3. Download the prerequisites by first viewing the information in a  grid and then filtering / selecting what you need to download.

Note: The folder you specify as an argument to -destination parameter must exist.

Since we are using the Out-GridView cmdlet to display the available prerequisite downloads, it helps in creating an easy filter. You can select the files required and click OK to start the download. In the above screenshot, you see all the – including optional components – required for SharePoint 2013 on Windows Server 2012 with SQL Server 2012 database backend.

For Windows Server 2008 R2, there are a couple of patches that require you to request the download URL on support site. So, these two patches cannot be downloaded using this script.

This is it. Rest everything is self-explanatory.

Once you start the download, you can see the transfer progress on screen.

Once again, I might have missed a few components in my list or some information in that list may be wrong. This is mainly because there is very sparse documentation around the exact requirements. Do let me know if you come across something wrong or needs update. I will be happy to do so.

Filed under: deployment, PoshUtils, PowerShell, Scripting, Sharepoint, SharePoint2013

by

Ravikanth is a principal engineer and the lead architect for Microsoft and VMware virtualized and hybrid cloud solutions within the Infrastructure Solutions Group at Dell EMC. He is a multi-year recipient of Microsoft Most Valuable Professional (MVP) award in Windows PowerShell (CDM) and Microsoft Azure. Ravikanth is the author of Windows PowerShell Desired State Configuration Revealed (Apress) and leads Bangalore PowerShell and Bangalore IT Pro user groups. He can be seen speaking regularly at local user group events and conferences in India and abroad.