Heute habe ich bei meinen Kollegen mitbekommen, dass Sie eine neue Webseitensammlung (Site-Collection) mit einer eigenen Inhaltsdatenbank (Content Database) anlegen mussten. Ich habe es so wahrgenommen, dass dieses Szenario über die UI doch etwas umständlich ist. Da ich in letzer Zeit immer mehr Begeisterung für PowerShell empfinde, habe ich mich doch einfach daran gemacht und das folgende Script angefertigt :-)
# Enter your SQL Server Instance
$SQLServer = 'SPS2010SQLServer'
# This variable stores your content-database
$contentDB = 'SP_2010_Content_DB'
# Here you have to enter the URL of your webapplication
$SPWeb = 'http://SharePoint2010'
# Enter the URL of your new site-collection
$SPSite = 'http://SharePoint2010/websites/newSiteCollection'
# Please enter here your primary site-collection administrator
$SPSiteAdmin = 'Domain\SP_Admin'
# Enter your primary language (1031 = German)
$LanguageID = '1031'
# You although can specify the template for this site-collection (STS#1 = blank)
$SPTemplate = 'STS#1'
# This statement creates the new content-DB
New-SPContentDatabase -Name $contentDB -DatabaseServer $SQLServer -WebApplication $SPWeb
# Creates the new Site-Collection on the specified Content-Database
New-SPSite -URL $SPSite -OwnerAlias $SPSiteAdmin -ContentDatabase $contentDB -Language $LanguageID -Template $SPTemplate
Viele Grüße,
Patrick
Kommentare
Kommentar veröffentlichen