Posted by Amber Pham on February 28th, 2011


Installing SharePoint 2010 from the GUI installer off the CD is fine if you will only be doing it once and if you don’t need to be able to replicate the settings precisely later. If you will potentially need to replicate the exact same farm settings a second time, you should automate the installation with PowerShell. CodePlex has created an automated installation script that requires you to gather all the necessary information up front, create all the accounts you will need, and create at least one web application. While this requires more up-front organization, it pays off in the long run.
The CodePlex project is called AutoSPInstaller: http://autospinstaller.codeplex.com/
The Version 2 beta is being updated regularly. It worked for a basic two-server farm (WFE + separate SQL backend).
The set of scripts works great, but there are very few instructions for the beginner, so I have compiled some here.
Before you run the scripts:
1. Create domain accounts and configure the WFE and the SQL server per this article: http://technet.microsoft.com/en-us/library/cc678863.aspx
2. You will also most likely want to create the object cache user accounts: http://technet.microsoft.com/en-us/library/ff758656.aspx
3. Ensure PowerShell v2 is installed. It is included with Windows Server 2008 R2.
4. Edit the xml file(s) being read by the script.
- Config.xml needs to be updated with the product ID (license key).
- The AutoSPInstallerInput.xml file (that is its name as of build 67032) needs to be updated with all the actual account names and other settings you would like to use.
5. Make sure that if you decide to create the initial portal web app, use the application pool account you defined within managed accounts.
6. Determine whether you want Claims (Kerberos) or Classic authentication and specify that when creating the first web application: http://technet.microsoft.com/en-us/library/cc262350.aspx. The script defaults to claims. To use classic/NTLM, change useClaims to False.
<WebApplication type=”Portal”
name=”Portal Home”
applicationPool=”PortalHome”
applicationPoolAccount=”DOMAIN\portalacc”
url=”http://localhost”
port=”80″
databaseName=”PortalHome_Content”
useClaims=”False”>
When you are ready to run the installer:
1. Temporarily disable UAC.
2. Disable any anti-virus active scanner.
3. Run PowerShell as Administrator then run the following commands
- Set-ExecutionPolicy -executionpolicy unrestricted for scopes: LocalMachine, Process, and CurrentUser.
- “Add-PSSnapin Microsoft.SharePoint.PowerShell”
4. Use the FolderStructure.txt as a guide to where to put the installer files and the scripts. Basically, you should put all the installer files (usually extracted from a CD or ISO) into a folder called SP2010. Inside that folder at the top level, drop the AutoSPInstaller script folder with its files.
5. Create the accounts that you configure as managed accounts in the xml file. Every service you tell it to create (such as the Managed MetaData) needs a managed account, or you will get an error and will have to create the service later.
6. If you are working with a virtual machine, take a snapshot at this point before you kick off the Launch.bat.
7. Log in as the setup user (local admin), and kick off the batch.
8. By default the log will be placed on the logged in user’s desktop. This will have any errors that scrolled by on the screen. If there is an error, the log will show the line number in the script that produced it. Fix the error and run the script again – it will just skip the parts that are already done.
After the installation completes:
1. You will need to change the loopback check setting.
2. Install the patch mentioned in the log if you will be using claims based (Kerberos) authentication.
3. Watch the application and system error logs for at least 24 hours and resolve any issues you find there.
4. Complete security hardening steps for the farm servers.
I welcome comments and suggestions about how to make this process even more complete. The folks working on this CodePlex project are actively updating the scripts and taking suggestions to make it better, as well.
Enterprise IT | No Comments »