Thursday, January 14, 2016

How to create new site collection with new content database using PowerShell

New-SPContentDatabase -Name "PeakDB"  -DatabaseServer  "Peak"  -WebApplication  "http://peakfinder"

 

$dbname = Get-SPContentDatabase " PeakDB "

 

New-SPSite -URL $site -OwnerAlias $owner1 -SecondaryOwnerAlias $owner2 -ContentDatabase $dbname -Template "BLANKINTERNET#0"

No comments:

Post a Comment