Automate that SharePoint 2010 Install (updated)

SharePoint 2010 provides administrators a quick and easy installer and then allows them to continue configuring it with a web based wizard.   For development and test environments this deployment method works very well, however, for a production environment it may not be ideal.

One issue with the configuration wizard is that it generates very complex database names with GUIDS.  GUIDs are used in order to ensure that the database names don’t conflict with any other databases already on the SQL server.   (Of course, you are installing SharePoint on a dedicated SQL instance, right?)   DBAs usually have major heartburn when they see the default database names generated by the wizard.

The configuration wizard also automatically makes some assumptions and sets configuration options that may not be optimal for your environment.  

A different option is to script the installation using PowerShell.   This method can be a very time consuming process as there are many steps involved in building out a SharePoint farm that the wizard handles for us.   A scripted environment does allow you to quickly deploy new farms with the exact same configuration and can be of great value for disaster recovery.

A few people over at CodePlex have come up with a solution that can quickly get you on your way to a fully scripted SharePoint install.   The project is called AutoSPInstaller and it consists of a few PowerShell scripts and a couple XML configuration files.

To get started you will want to download the AutoSPInstaller scripts and expand them into a directory.  Next, copy all of the SharePoint installer files and folders into the SP2010 folder created when you expanded the AutoSPInstaller.zip file.

In the /SP2010/AutoSPInstaller folder open up the config.xml file and enter in your SharePoint product key.   You will then move on to the AutoSPInstallerInput.xml file and modify it to include the proper service account names and settings for your environment.

Before kicking off the AutoSPInstaller you will want to double check all of your settings in the configuration files and also ensure that you have created all of the accounts you specified.   Once you start the AutoSPInstaller there isn’t any stopping.   If something does go wrong you can manually uninstall SharePoint (Control Panel –> Programs) and then manually delete all of the databases in your SQL server instance.  

Although this script does help you get your SharePoint environment built in a very consistent and repeatable way there are still many manual configuration steps that are not yet included.   Some of the SharePoint service applications (such as Access Services) do not get provisioned and many settings are not scripted.

AutoSPInstaller is a great start for building out your own SharePoint installation scripts.  You may wish to extend the script for provisioning additional services or configuring features within SharePoint that is specific to your deployment.

Major Kudos to the AutoSPInstaller team and I look forward to seeing future updates.

Check out AutoSPInstaller over at CodePlex

Update 4/4/2011

The Microsoft IT team has also released the scripts that they use for automatically building out their SharePoint environments.   You can find these scripts at CodePlex in the SPAuto project.   This project includes multiple scripts grouped by function.   The “pre” scripts ensures that the SharePoint server is configured properly with the prerequisites and is ready for the SharePoint install.   The “main” scripts perform the actual SharePoint installation and the “post” scripts perform post install configuration settings such as alternate access mappings and permissions.

One interesting capability of this set of scripts is that they will also install Office Web Apps.  Remember that you must be licensed for Office 2010 in order to deploy the Office Web Apps.

To download these scripts go to the SPAuto project page, click on the source code tab, select the latest change set and then click on the download link.  This will zip all of the files up and download them to your local machine.

Although there are many installation scripts for SharePoint 2010 I would not blindly rely on them for your installation.  Please make sure you review and completely understand what the scripts are doing.  Most likely you will want to modify the scripts based upon your own needs for SharePoint.

If you are looking to script the build-out of your SharePoint 2010 development environment take a look at this previous post.

Leave a Reply