So… as an avid user of Twitter I noticed a few tweets going back and forth between Spence @Harbars and Brian @BrianLala about this tool on CodePlex called AutoSPInstaller. I have heard about it in the past but most recently and after speaking to Spence about what he ‘coined’ the Idiot Button i.e. the Farm Configuration Wizard; I have been on the quest to find a way to automate creating Service Accounts after installing the SharePoint bits. Spence does have a few blogs on the topic which i have used to great success, but in the end PowerShell is there for a reason, i just needed to know how to use it. As a DEV, I wasnt looking forward to learning PowerShell, though i know I have to, but this #AutoSPInstaller utility allows me to cheat – at least for a time – and I get the best of both worlds.
I felt it necessary to blog my experience because there are at least two gotchas that I am aware of but overall my experience was satisfactory.
So after downloading the tool, the first thing i will encourage you to do is.. yes.. Read the “ReadMe” file that is included. It details what you need to do to fire off the script. The tool comes with a few XML files that you will have to modify; by that I mean, configure. However, these configuration steps is just a matter of providing nomenclatures for your Databases, your Account Names for Service Accounts, your Passwords for those accounts, and whether you want to install features by indicating 1 or 0 (zero).
There is a Launch.bat file which executes the PowerShell (*.ps1) file; which inturn interrogates a Setup(optionalfilename).XML file for configuration specifics. In my modifications to my Setup.XML i also renamed to file to include the NETBIOS name of the Server, this allows me to have a specific file for each server in the Farm.
The First Gotcha I encountered had to do with the Installation of the Bits; the script provides for executing the PreInstaller which does work; however I had an issue whereby one of the packages failed so that didnt allow the SharePoint Install to run after the PreInstaller completed. Basically, the script didnt have a graceful exception rule for instances where the PreInstaller fails. What I got was a generic error BUT, the script log file did tell me where the error was encountered and I did notice it was in the [Region] for the PreInstaller. So I just ran the AutoInstaller by itself and then re-ran the AutoSPInstaller Launch.bat file
The Second Gotcha I met was right after I executed the batch file. The error is below in the screen shot.
The Error isnt that descriptive but after going back to Twitter and on CodePlex I saw that I either had to do one of the following
- Do a “Run-As” and run the batch file as an Administrator or
- Turn off User Access Control (UAC)
What I found particularly interesting is that although I ran the file on the SharePoint box; which is where I got the error, it was actually referencing an issue on a separate Box, i.e. the SQL Box
So, I elected to make the changes to UAC because I also don’t like the interruptions when i am installing products.
After I completed those issues with my mitigation techniques; it was smooth sailing. I have included below some screenshots of the process and the resultant logs
Below is the Command Window iterative logs; which is also captured in a log file
Below are all my Sites that were created.
So in Conclusion.
You are going to have questions on this blog, the first one may be..Well Fabian “What do i do if I wan to build out a Farm that Includes more than one Server (in-fact I fielded a question on Twitter already on this one)..
the answer is to create another specific Setup[YourNameHere]Inputs.xml file and this time it will JOIN the already created farm rather than create a new Farm. There are several “If Exist” statement in the PowerShell script that does checks for that. Now though I did this in my Lab fortunately this week, I am on a project where I need to do a Base Install of SharePoint 2010 and I plan to use the tool for that. I will let you know how it goes…
As usual, I welcome any Comments, Questions,