Posted by: John Ferringer | July 21, 2011

Found a Script: Automating the Download of SharePoint 2010 Installation Pre-Requisites with PowerShell

Last month I ran into a bit of an interesting situation at a customer site. I was asked at the spur of the moment to install SharePoint 2010 on a rebuilt Hyper-V cluster, which on the surface didn’t seem like too crazy of a request, and it shouldn’t have been (little did I know that the issue I’m explaining here was just the tip of the iceberg, but that’s a war story for another day). So I opened up my Remote Desktop client and connected to the VM that was targeted to host the SharePoint side of the farm, making sure that I had the SharePoint 2010 installation media attached to the server in Hyper-V Manager so I could access the ISO as a mounted drive.

Once I logged on to the server as the installation account, the first thing I wanted to do before kicking off my installation scripts for SharePoint 2010 itself was to get its pre-requisites installed, the other applications and services that SharePoint requires be installed on a server before it can be installed itself. One of the things I love about SharePoint 2010 is that it comes with its own Pre-Req installer, so you don’t have to flail about getting all of the different applications from where ever Microsoft has stashed them throughout their various web sites, then installing them and configuring them exactly the way that SharePoint wants them put on the server; this tool takes care of all of that for you.

As an aside, another thing I love about the Pre-Req Installer is that it also enables and configures the Windows Server 2008 Roles and Features that SharePoint 2010 requires, something that is actually often more tricky than you’d think. This was introduced along with Windows Server 2008 support in SharePoint 2007 Service Pack 2, and is a godsend (I once blew two days on a WSS v3 install b/c I tried to manually configure the Application Server role on the server instead of letting the installer handle it. I’ll do a post on that whole sordid affair when I get a chance).

Well, when I ran the SharePoint 2010 Pre-Req installer, I ran into a nasty surprise. It configured the server’s Windows Server 2008 Roles and Features just fine, but when it went to go download the installation files for the pre-requisite applications, it failed. Want to know why? Because this server did not have a live Internet connection! Now, to some people that may seem surprising, but honestly I was glad for it. This was a completely internal SharePoint farm, and it was pleasant to see that they hadn’t opted for the easy route here. To make it more secure, this farm wasn’t going to get an external network connection (and in fact it was on a completely contained network, the only way to access it from the customer’s Production network was through a Forefront TMG reverse proxy gateway).

So I had to manually download all of the installation files to my laptop and then upload the files on the to server over my RDP session (via a direct connection from my laptop to the SharePoint server’s network) before I could actually run them on the SharePoint server. Not only was it time consuming (at least it was until I found this page:, which has links to everything I needed), but it was also a little nerve-wracking trying to figure out what I needed and making sure I had the right version of everything. (By the way, SharePoint MVP Kanwal Khipple has a very good blog post up about How to install the SharePoint 2010 Pre-Reqs with and without an Internet connection!)

Well, since I had some time while I was waiting out the downloads, I started thinking about how to make this easier. The bright idea I had was to write a PowerShell script that would go out and automate the downloading of all the files required by the Pre-Req Installer, so I wouldn’t have to go out and do this all over again the next time I needed it. But, then my download finished, so I filed that idea away for a rainy day and asked a co-worker to occasionally pester me into writing that script one day as a accompanying resource for the awesome AutoSPInstaller project on CodePlex, which is coordinated by Brian Lalancette and includes several other sterling contributors.

But, wouldn’t you know it, someone beat me to it. I was checking out my Twitter feeds the other day, and noticed someone sharing out a link to the TechNet Script Repository to a script that sounded quite a bit like what I had described to my coworker: Download SharePoint 2010 Pre-Requisites. And wouldn’t you know it, it was also written by Brian Lalancette! So if you want to automate the downloading of your SharePoint 2010 Pre-Reqs, I’d suggest you check it out!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


%d bloggers like this: