During setup of MOSS/WSSv3 the SharePoint Products and Technologies Configuration Wizard is run to create a new configuration database and establish a new server farm, or connect to an existing configuration database joining the server to an existing farm. There is a command line version of the configuration wizard called PSConfig.exe. This binary can be found in %rcommonprogramfiles%\Microsoft Shared\Web server extensions\12\BIN.
The command line version of the configuration wizard can be used together with the Stsadm command-line tool to perform an unattended installation and configuration of MOSS/WSSv3. I wrote four command-line scripts that call PSCONFIG.EXE and STSADM.EXE to automate provisioning / un-provisioning of a Server Farm and Shared Services Provider:
The available commands for PSCONFIG.EXE are:
PSCONFIG.EXE -cmd setup [-lcid <1033>]This performs SharePoint configuration setup based on the installation mode. If SharePoint is installed in a stand-alone mode, then stand-alone configuration is done. If SharePoint is not installed in stand-alone mode, you must complete initial configuration setup by using the SharePoint Products and Technoligies Configuration Wizard windows application located in the start menu shortcut.
lcid: The LCID that specified the SharePoint installation language
PSCONFIG.EXE -cmd standaloneconfig [-lcid <1033>]This command will perform a SharePoint stand-alone configuration.
PSCONFIG.EXE -cmd configdb [-create] [-disconnect] [-connect] [-server <SqlServerName>] [-database <SqlDatabaseName>] [-dbuser <value>] [-dbpassword <value>] [-user <Domain\User>] [-password <Password>] [-addomain <value>] [-adorgunit <value>] [-admincontentdatabase <SqlAdminContentDatabaseName>]Creates, connects, or disconnects this server from the server farm.
PSCONFIG.EXE -cmd helpcollections -installallThis command manages help collections.
installall: Installs all available help collections.
PSCONFIG.EXE -cmd secureresourcesThis command will perform SharePoint resource security on this server. For example, security is enforced on files, folders and registry keys.
PSCONFIG.EXE -cmd services [-install] [-provision]This commnd can be used to manage SharePoint services
PSCONFIG.EXE -cmd installfeaturesThis command will register the SharePoint features in the server farm that are located on this server.
PSCONFIG.EXE -cmd adminvs [-provision] [-unprovision] [-port <8080>] [-windowsauthprovider <enablekerberos | onlyusentlm>]This command manages the SharePoint Central Administration Web Application on the local machine.
PSCONFIG.EXE -cmd upgrade [-wait] [-reghostonupgrade] [-finalize] [-inplace <v2v | b2b>] [-sidebyside]This performs a SharePoint upgrade. This command is automatically executed when running the SharePoint Products and Technologies Configuration Wizard if SharePoint needs to be upgraded.
PSCONFIG.EXE -cmd evalprovision -provision [-port <80>]This performs stand-alone mode provisioning on this server.
PSCONFIG.EXE -cmd applicationcontent -installThis command manages shared application content.
PSCONFIG.EXE -cmd quietThis command runs the SharePoint Product and Technologies Configuration Wizard in quiet mode. Output is written to PSCONFIG.EXE_MM_DD_YYYY_HH_MM_SS_MS.log