Welcome to MSDN Blogs Sign in | Join | Help

TFS 2008 & Scripting the WSS 3.0 Configuration

For any body who wants to script the Products & Technologies Wizard & the extending of default web site in IIS with WSS 3.0 the below script would be the answer.

Thanks Siva for the being the inspiration behind this. :)

Copy the below script in a text file & save it with a .bat extension. Run the .bat in a command prompt window to complete the operation. The PCW log would be created at the path c:\PCWPrimary.txt.

 ====================================================================

@echo off

Rem Set ServerName to the SQL Server Instance
Set ServerName=SQLBOXNAME

Rem Do not Change this
Set ConfigDBName=WSS_Config

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 Do not change this
Set AdminDBName=WSS_AdminContent

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
Set AdminEmail=user@domain.com

Rem Do not Change this
Set ContentDBName=WSS_Content

 

@echo on

@Echo  ---- Dumping the PCW log at c:\PCWPrimary.txt ----

@echo off

Pause

CLS

cd %WSSDIRPATH%

Cls

@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:\PCWPrimary.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"

IISReset


Rem Create the root site collection

stsadm -o createsite -url http://%ServerName% -ownerlogin %SetupAccount% -owneremail %AdminEmail% -sitetemplate STS


@echo All Operations completed succesfully..

@echo Please check C:\PCWPrimary.txt for details..

 

================================================================================

 

Published Tuesday, October 07, 2008 2:35 AM by Lakhminder

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker