The not-nearly-updated-often-enough blog of Brian Lalancette

Using PowerShell to Automate SQL 2008 R2 SP1 Slipstreaming

June 26, 2012 by Brian Lalancette

Like most of you SharePoint folks, I find myself installing SQL Server quite frequently (since SharePoint has an ever-so-slight dependency on it). However I also like to have the latest & greatest service pack in my environments, and currently this means SP1 for SQL 2008 R2 (yeah I know SQL 2012 is out, but most of my clients are a bit shy with such ‘new’ releases). Since I do extreme slipstreaming of SP1 + CUs for SharePoint as described (for example) in Todd Klindt’s excellent blog post, I looked for a way to do this with my SQL Server 2008 R2 binaries.

The slipstreaming process for SQL Server is a bit convoluted, and for a guy like me, very forgettable. It is however fairly well documented in articles like this one. Therefore I sat down on evening and sought to automate the process, in order to minimize the amount of thought and manual effort required.

I wanted this script to:

  • Copy the original RTM binary files from a DVD/ISO/directory to my designated path
  • Download the SP1 packages for me (cuz I didn’t want to have to remember or hunt around for the URLs for the service packs for each respective platform (IA64, x64, x86) each time I needed to slipstream)
  • Extract each platform service pack (thus avoiding having to remember the associated command-line switches)
  • Make the required edits to each platform-specific DefaultSetup.ini
  • Place a nice little text file to serve as a label in the target path, to remind me that I’d slipstreamed this particular binary source location

Anyhow I’m happy to announce my successful first attempt at tackling the automated slipstreaming of SQL 2008 R2 + SP1 via PowerShell, and you can grab it from the TechNet Script Center Gallery, here.

Cheers Brian

P.S. My next goal in case you’re interested is of course to automate SharePoint 2010 service pack and cumulative update slipstreaming, but due to the way MS packages their CUs this has proven challenging (apparently there are no known command-line switches for the downloaded Microsoft Self-Extractor packages!)

Written by Brian Lalancette

Hey fellow Sharepointers/Powershellers/infrastru… ah never mind. My name is Brian Lalancette, and I’m a Premier Field Engineer (PFE) at Microsoft Canada.

This blog is a long time coming, and a realization of my New Year’s resolution for 2010 – to share some of the knowledge about SharePoint, server virtualization/infrastructure, and other tidbits I’ve picked up over my 18+ years in IT. Hope it can help some of you out, and always looking forward to hearing your thoughts & comments. All posts and info are provided without warranty, etc. etc. and I’m not responsible for blowing up your or my production servers, deleting all your data, or leaving coffee stains on your desk and crumbs in your keyboard.

Cheers! Brian

You should follow Brian on Twitter