Automating SharePoint Installation

SharePoint

This article is a re-post of the article I authored for MSSharePointTips which can be found here: MSSharePointTips Article

This article primarily applies to SharePoint 2010 (Foundation or Server). For SharePoint 2007, skip to the bottom.

What?

Automating SharePoint installation means performing a series of steps to setup your SharePoint Farm without user interaction. There are various tools we can use to help with this, some that will just install SharePoint, some that will help with initial Farm configuration and others that go a bit further.

Why?

Automating or scripting any installation brings several benefits, some more obvious than others:

  • Finer control of naming conventions such as database names, site names, etc. (side effect)
  • Reduce errors, such as in database naming conventions, disk or folder placement, and service accounts.
  • Provide consistency across environments and across different Farms. For example, a development, testing, and production environment.
  • Save time by letting the install run while you do something more important than watching progress bars

How you ask? Well there are a few options.

Option 1

If you’re just installing SharePoint for development purposes, you can use this Script to Install SharePoint 2010 on Windows 7. Note, for Windows 7 only. This script does a nice job of getting you up and running fast. It enables all the required Windows Roles and Features, downloads and installs pre-requisites, and installs SharePoint 2010. It’s a single uncomplicated script with just a few prompts (such as for your product key).

Option 2

For a less restricted approach, such as being able to install on Windows Server, you can use SPModule. Zach Rosenfield’s blog post titled SPModule.HelloWorld() has some more specifics on how to install the module, sign it, and use the command functions. It can’t get any easier than this: Use Install-SharePoint to install; New-SharePointFarm to create a new farm! Zach even explains how you can use SPModule to run several SharePoint installs remotely in parallel (Remote Install of SharePoint).

Option 3

My favorite option is to use AutoSPInstaller. Brian Lalancette (twitter @brianlala) has done all the work in collecting scripts, tips, and other information from various sources and has put together a very nice script. You just unzip the package into your existing SharePoint installation source (I recommend copying/extracting your SharePoint DVD/CD/ISO to a network share) and edit an XML file. Then, you simply run “launch.bat” and away it goes.

During a recent deployment, I configured one input XML file for each of my servers. They were essentially the same (same service accounts, database names, etc.) and I just needed to change the Web App name. This allowed me to run 4 or 5 installs simultaneously. I configured the script to install language packs and all the prerequisites from my network share as well.

Unlike the other two options, when you’re done here, you have all the essential services you need (Managed Metadata, User Profile, Search, Secure Store, Web Analytics, and more). You can configure it NOT to install one or all of these (I don’t need Web Analytics). Additionally, it can create a Web App with a site collection and even your My Site host.

Best of all, since you’re specifying your database names, they’re clean without GUIDs!

Before you start, I do recommend you review service account permissions. Check out Todd Klindt’s Suggestions (twitter @toddklindt) or my wiki page: Permissions Chart (essentially the same info). Also set up SQL Aliases (so you can specify them in your script) and copy updates to the \Updates folder in your SharePoint installation source. I used the August Cumulative Updates for SharePoint Server 2010.

Conclusion

Scripted installs can save time, provide consistency and make it easier if you need to rebuild the Farm. Use the approach you’re most comfortable with considering your purpose and environment or create your own using the samples here. Although it may take a bit longer to learn and properly configure these scripts up front, the effort will be well worth it.

For an excellent write up on automating SharePoint 2007 installation (install, provision, etc.), see Joel Oleson’s (@joeloleson) post: Automating and Scripting SharePoint Administration and be sure to check out Gary LaPointe’s (@glapointe) Sample Script.

email
6 comments… add one
  • zee Dec 15, 2010

    Nice blog. Thanks.
    zee
    walisystems.com

  • admin Sep 22, 2013

    Hi

    I am relatively new to SharePoint Administration. I am trying to user AutoSpinstaller to install my farm.[1 wfe and 2 application servers].

    I have really silly basic question. I have configured the AutoSpinstaller Gui and set up the services i need. I have enable remote install.
    Where and how do i specify the roles of the servers and how do i kick off remote install on other machines ?

    Can someone point me in the right direction.

Leave a Comment

%d bloggers like this: