Install SharePoint 2010 using AutoSPInstaller

I’m about to create a whole new installation of SharePoint 2010 so have decided to take AutoSPInstaller for a test drive.

To prepare, I have:

  • Built a new Windows 2008 R2 server and installed Active Directory, creating a new domain in a new forest
  • Built a new Windows 2008 R2 server and installed SQL Server 2008 R2 and joined this to the domain
  • Built a new Windows 2008 R2 server to host SharePoint 2010 and joined this to the domain
  • Created a new SQL instance called SHAREPOINT
  • Edited the AutoSPInstallerInput.xml file with the correct service account details, installation path and license key
  • Put the SharePoint 2010 setup files into the AutoSPInstaller\SP\2010\SharePoint folder
  • Extracted the setup files for Service Pack 1 into the Updates folder within my installation source

I have also created the following service accounts in Active Directory:

  • SP_CacheSuperReader
  • SP_CacheSuperUser
  • SP_Farm
  • SP_PortalAppPool
  • SP_ProfilesAppPool
  • SP_ProfilesSync
  • SP_SearchContent
  • SP_SearchService
  • SP_Services

To kick off the installation I have launched the AutoSPInstallerLaunch.bat file, which calls the PowerShell script.

Attempt number 1: The script doesn’t like spaces in the installation source path.  I have added an underscore to the ‘Microsoft SharePoint’ folder to make it ‘Microsoft_SharePoint’.

Attempt number 2: The script has got further but now I’m told that I cannot run the script as a local user, I need to be logged on as a domain user.  I have logged off the local administrator account and logged on as the SP_Farm user (after adding it as a local administrator).

Attempt number 3: Again, the script has now got further but halted due to invalid credentials.  I didn’t create some of the users because I have chosen not to install the Enterprise features as I only have a Standard license, but it must check them anyway.  So I have created all of the missing user accounts (I will disable them later as they will not be used).

Credentials_Invalid

Attempt number 4: Looking much more promising this time I have got past the environment checks and the preparation tool successfully installed the prerequisites.  Even the SharePoint installer and updates completed successfully.  However, there was yet another issue to resolve:

A known (annoying) issue occurred loading the SharePoint Powershell snapin.  We need to re-launch the script to clear this condition.

Local_Farm_Not_Accessible

It turns out I just needed to restart the server, as the script failed to do it (I worked this out by trawling through the script to find out what generated this message).  After restarting the server, sure enough I was able to run the script again and continue.

Attempt 5: Again, I have got further this time but encountered another error:

The term ‘Get-Website’ is not recognized as the name of  a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Having searched around a bit I discovered that I needed to edit the AutoSPInstallerFunctions.ps1 file in order to enable the Get-WebSite command.  On line 1291 (inside the ConfigureFarm function) I added the ImportWebAdministration command:

ImportWebAdministration

And that was it .. I re-ran the script and the installation has completed successfully!  The script has installed everything, created the databases and configured the web applications.  I especially like having nice database names that do not contain the GUID:

SharePoint_Databases

[BlogBookmark] [Blogsvine] [del.icio.us] [Digg] [Facebook] [Furl] [Google] [LinkedIn] [MySpace] [Reddit] [Slashdot] [StumbleUpon] [Twitter] [Windows Live] [Yahoo!] [Email]