AutoSPInstaller: Automated SharePoint 2010 Installation Scripts
Brian Lalancette, 2009-2011
The AutoSPInstaller SharePoint Server 2010 automated installation procedure currently consists of:
README.rtf (this file)
AutoSPInstallerLaunch.bat: Master batch file that kicks off the process, self-elevates to deal with User Access Control, and checks the version of Powershell installed. No need to edit.
AutoSPInstallerMain.ps1: The Powershell script file that serves as the ‘controller’ for the scripted process, sources AutoSPInstallerFunctions.ps1 and AutoSPInstallerFunctionsCustom.ps1 and calls each function contained therein. If you choose to add custom functions (see below) you will probably want to call them from this script file
AutoSPInstallerFunctions.ps1: Does most of the heavy lifting. Contains the majority of the functions and code for the AutoSPInstaller scripted process. No need to edit.
AutoSPInstallerFunctionsCustom.ps1: Here is where you can add any extra functions (e.g. for additional services & service apps, etc. This file is sourced from AutoSPInstallerMain.ps1 so you will need to call any functions you include here from that file.
AutoSPInstallerInput.xml: An xml file that provides the variables used by AutoSPInstaller.ps1. You WILL need to edit this file as appropriate for your particular environment. Note: you can have different files for different servers (AutoSPInstallerInput-COMPUTERNAME.xml) and/or different files per domain (AutoSPInstallerInput-DOMAIN.xml). This can avoid having to continually update your input file for different servers/environments. So, the script will first use AutoSPInstallerInput-%COMPUTERNAME%.xml if it exists, then look for and use AutoSPInstallerInput-%USERDOMAIN%.xml if it exists, then finally just AutoSPInstallerInput.xml if it doesn’t find any server- or domain-specific input files.
Config.xml: Standard SharePoint input file that controls the behaviour and type of SP2010 binary file installation. You WILL need to edit this in order to provide the PIDKEY (Product ID Key) value appropriate for your environment.
The script is designed to detect installed/configured components, so can safely be re-run; for example, if you encounter an error during script execution, require a server reboot after installing the prerequisites, or are otherwise interrupted.
This SP2010 automated installation procedure is loosely based on some existing resources such as http://poshcode.org/1485 and http://sharepoint.microsoft.com/blogs/zach/Lists/Posts/Post.aspx?ID=50.