How's it Work?: Codeplex AutoInstaller Script

So since we’re expert at beginner PowerShell Scripts, maybe we should take a look at the AutoInstaller on CodePlex. Download it and you’ll find it’s got an AutoSPInstaller.ps1 script inside.

It takes about two seconds to see we got work to do. First, there’s this issue of the:

    [string]$InputFile = $(throw 'need parameter input file
    (e.g. "c:\SP2010\Scripted\SetInputs.xml")')

So I can’t quite crack this but when you look at get-help throw, you see it looks like they’re making the path a required parameter or bailing on the script.

The second issue is that of iterating through an XML file. Now I imagine we’re going to put all our configurations in an XML file and the script will read it and call the SharePoint Management Shell commands that use them to build your whole farm with one click. Groovy.

So how do we iterate through an XML file? Well, our new best friend, Dan, covers it pretty good here. He’s got the best line of the day:

With some practice you actually can drive nails with a screwdriver and then you only need to learn how to use one tool to build a house.

I gotta tell you guys and gals, I see alot of myself in that one-tool group. So maybe Dan will help. The problem is that his example is a grocery list and it’s almost supper time so, I’m heading out to:

  1. Buy Groceries
  2. Make Dinner
  3. Iterate…

Sound like an exciting evening for a robot.




Comments are closed.