Project Description
CMD/BAT and PowerShell scripts which provide a quick and near-unattended installation and initial config of Microsoft SharePoint Server 2007 on Win 2003/2008.

This set of batch scripts is based on (but significantly extends) the scripts originally found in the Office SharePoint Server 2007 farm automated setup Codeplex project.

No more hunting around for your 'latest' MOSS installation doc/guidelines, squinting over screen captures, or worrying about whether so-and-so remembered to select that option while entering that username on that particular screen - all now merely relics of The Dark Age of MOSS Installations.

The scripts will:
  • Check whether the target server is running Windows 2003 or 2008, and whether the platform is x86 or x64
  • Prompt you to start at a specific point in the process, or simply run the entire script. Useful for 2nd, 3rd etc. servers in the farm, or subsequent attempts
  • Prompt you to enter all service account passwords (should you choose not to specify them in the script, for security reasons)
  • Automatically install platform-specific pre-requisites (e.g. IIS, .Net Framework)
  • Disable some unnecessary Windows services (configurable by editing DisableUnneededServices.ps1)
  • Install the MOSS build binaries with no user input
  • Run the SharePoint Products and Technologies Configuation Wizard (psconfig.exe) in order to create the Farm (Config/Central Admin content databases, Central Admin site, help collections, etc.) - no user input
  • Configure and start SharePoint services (WSS Search, MOSS Search, Excel Services) - no user input
  • Create/configure your SSP and My Sites web apps, and create the SSP - again, no user input
  • Create the main Portal - you guessed it, no user input
  • Restart IIS, and launch IE to view the results of your hard work (just in time for your return from lunch)
  • Log all of this to %TEMP% and pop open the log file for review, when finished.

There are around 40 input parameters to define in SetInputs.cmd (which illustrates how much stuff you really have to plan & gather during a regular MOSS install). However this is a one-time-per-install effort, and the trade-off includes hours saved and better spent elsewhere (see lunch above) and an avoidance of the risks involved (typos, missed settings etc.) during manual installations.

To-do's:
  • Make the process a bit more flexible (to accomodate multi-WFE farms, different scenarios etc.). However once the first farm server is configured, the rest require much less config.
  • Account for different Index server scenarios (currently the script assumes single-server, combined Index/Query server)
  • More robust error handling & reporting
  • Optional emailing (SMTP) of log file (since the log will effectively be the record of your build)

In addition to the scripts, you should create an installation source (local or shared) containing:
  • The entire contents of the MOSS 2007 CD
  • The Path \Extras\Pre-Requisites
  • The following files (in the path above), which can all be downloaded from http://download.microsoft.com:
    • dotnetfx30SP1setup.exe
    • dotnetfx3_x64.exe
    • dotnetfx3_x86.exe
    • NetFx20SP1_x64.exe
    • NetFx20SP1_x86.exe
    • WindowsServer2003-KB926139-v2-x86-ENU.exe
    • WindowsServer2003.WindowsXP-KB926139-v2-x64-ENU.exe

When you're done, your folder structure should look something like this:
  • <drive:>\MOSS2007\
    • \Extras
      • \Pre-Requisites\
    • \Scripted\<these scripts>
    • \x86\<binaries>
    • \x64\<binaries>

Add-in utilities that will need to be downloaded separately and placed in the same path as the scripts:
  • Sysinternals PSKill.exe (for closing PSConfigUI popup - couldn't find a way to disable it otherwise)
  • Tee.exe (part of UnxUtils.zip - for detailed logging to file in addition to screen output)

Useful references:

I would also recommend slipstreaming MOSS/WSS service packs and hotfixes into your installation source too, to further automate the process. There are several resources out there that can provide instructions for slipstreaming.

See the readme.rtf for more info.

Last edited Jul 20, 2009 at 8:15 PM by brianlala, version 17