Using Brian’s vCAC Prereq Script in an Offline Environment

Time for another “PoC Lesson Learned”. This time I had to overcome the fact that I had no Internet for the environment that I was deploying to. The upside of this was that this meant I didn’t have to fight Windows 2012 over it wanting to automatically upgrade .NET to 4.5.1, the downside was that I couldn’t use Brian Graf’s great prereq script since Windows 2012 looks to download the latest components/features when you try to install them.

In order to get around this, I made a small change to Brian’s script. I appended a variable $source = “d:\sources\sxs” and then on every line that there was an “Add Windows Feature” I tagged a -source $source onto the end. Insert your Windows 2012 CD and you’re away. Please bear in mind that my CD drive was mapped to d: so be sure to update your value accordingly.

Here is a specific example:

Add-WindowsFeature -Name Webserver,Web-Http-Redirect,Web-Asp-Net,Web-Windows-Auth,Web-Mgmt-Console,Web-Mgmt-Compat,Web-Metabase -source $source

Hopefully you don’t find yourself in the same situation as I did, but if you do then I hope this is useful to you!