How to create a new site collection in existing web application but with new content database using powershell.
-
do you want to create new content database then new site collection or DB already created?– Waqas Sarwar MVP ♦Jan 13, 2016 at 18:08
-
i want to create new content database , with new site collection , and after my purpose is dismount and mount existing sharepoint 2010 content database and upgrade sp 2010 content db to sp 2013– adilahmedJan 13, 2016 at 19:00
2 Answers
You can use:
New-SPSite -Url $url –ContentDatabase $ContentDatabase -Name $WebsiteName –Description $WebsiteDesc -Template $Template -OwnerAlias $PrimaryLogin –OwnerEmail $PrimaryEmail
-
i want to create publishing site ,in sp 2013 what is the template id for publishing site? Jan 13, 2016 at 19:04
-
-
You have to create the Content Database 1st then you will be able to create new site collection.
New-SPContentDatabase -Name "database name" -DatabaseServer "database server name" -WebApplication "web app url"
$dbname = Get-SPContentDatabase "databasename"
New-SPSite -URL $site -OwnerAlias $owner1 -SecondaryOwnerAlias $owner2 -ContentDatabase $dbname -Template "BLANKINTERNET#0"
For site template codes, please check this blog. http://www.funwithsharepoint.com/sharepoint-2013-site-templates-codes-for-powershell/
-
Hi thanks, after that i want to mount sp 2010 content database to this new site collection and want to do migration to sharepoint 2013 Jan 14, 2016 at 7:47