Scripting Windows SharePoint Services 3.0 Setup for Team Foundation Server

Lakhminder Singh from our TFS install and setup team brings us today’s tidbit…


Installation and configuration of Windows SharePoint Services 3.0 can be done automatically by the installation of Team Foundation Server 2008. For anyone who wants to script this themselves however, the following could be the answer. This script takes care of creating the WSS content and config DBs in SQL, provisioning of the WSS Central Admin Site, extension of the default web site, and creating the root site collection. It assumes you already have WSS 3.0 installed on the machine.

To use it copy the script into your text editor of choice, edit the variables between the ++++++++++++ delimiters and then save it with a .BAT extension. Run the .BAT from a Command Prompt to complete the operation. A log will be created in c:\WSS3Primary.txt.

Watch out for word-wrap when you copy/paste!!


@echo off
REM ++++++++++++++++++++++++++++++++
REM Set ServerName to the SQL Server Instance

REM Set SetupAccount to the TFS Setup Account
Set SetupAccount=Domain\TFSSetup

REM Set Serviceaccount to the TFS Service Account
Set ServiceAccount=Domain\TFSService

REM Set ServicePassword to the password of the TFSService Account
Set ServicePassword=P@ssw0rd

REM Set WSSDIRPATH to the bin folder in the install location of WSS 3.0
Set WSSDIRPATH="C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN"

REM Set WSS Admin's email
REM ++++++++++++++++++++++++++++++++


REM Do not Change these values!
Set ConfigDBName=WSS_Config
Set AdminDBName=WSS_AdminContent
Set ContentDBName=WSS_Content
@echo on
@Echo  ---- Executing and dumping log to c:\WSS3Primary.txt ----
@echo off
@echo on
REM Run Psconfig to create config & admincontent dbs & to provision the Central Admin Site
psconfig -cmd configdb -create -server %ServerName% -database %ConfigDBName% -user %ServiceAccount% -password %ServicePassword% -admincontentdatabase %AdminDBName% -cmd helpcollections -installall -cmd secureresources -cmd installfeatures -cmd adminvs -provision -port 17012 -windowsauthprovider onlyusentlm -cmd applicationcontent -install > "c:\WSS3Primary.txt"
REM Extend the default web site
STSADM.EXE -o extendvs -url http://%ServerName%:80 -ownerlogin %SetupAccount% -owneremail %AdminEmail% -exclusivelyusentlm -databaseserver  %ServerName% -databasename %ContentDBName% -donotcreatesite -description "Default Web Site"

REM Create the root site collection
stsadm -o createsite -url http://%ServerName% -ownerlogin %SetupAccount% -owneremail %AdminEmail% -sitetemplate STS

@echo All Operations completed successfully
@echo Please check c:\WSS3Primary.txt for details


Comments (0)

Skip to main content