:: This batch file calls SharePoints admin executable to create a new SharePoint site in:: its own database at the Site level. Arguments are as follows::::: %1 - Site Name (No spaces or quotation marks):: %2 - SiteTemplate Site Template--do not include extension of .STP)::
echo off
if NOT "%2" == "" goto SiteTemplate
echo Creating Site (http://url.com/sites/%1) and database (WSS_%1) with no template
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o createsiteinnewdb -url http://url.com/sites/%1 -ownerlogin "domain\administrator" -owneremail owner@domain.com -databaseuser "sa" -databasepassword "password" -databaseserver "dbname" -databasename WSS_%1 -title %1
goto eof
:SiteTemplate
echo Creating Site (http://url.com/sites/%1) and database (WSS_%1) with template (_GLOBAL_#1)
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o createsiteinnewdb -url http://url.com/sites/%1 -ownerlogin "domain\administrator" -owneremail "owner@domain.com" -databaseuser "sa" -databasepassword "password" -databaseserver "dbname" -databasename WSS_%1 -sitetemplate _GLOBAL_#1 -title %1
:eof
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment