Posts

Showing posts from November, 2021

Create SharePoint Site Collection in a specific Content DB In SharePoint using PowerShell

As the SharePoint Central Administration doesn’t provide any interface to create a site collection with a nominated content database, we need to use PowerShell commands to create a site collection in a new content database for SharePoint on-premise. #Create a SharePoint New Content Database New-SPContentDatabase -name <<WSS_Content_DB_Name>> -webapplication <<http://Web_App_URL>> Create Site Collection in the previously created Content DB #Create a Site collection in the specific content database New-SPSite -Name "<<Site_Collection_name>>" -ContentDatabase <<WSS_Content_DB_Name>> -url <<Site_Collection_URL>> -OwnerAlias "domain\primary_Admin" -SecondaryOwnerAlias "domain\Secondary_admin" -Template "BLANKINTERNET#0" Here the template is the required site collection template. Some of the common template codes are below: Team Site: STS#0 Blank Site: STS#1 Wiki Site: WIKI#0 Blog: BLOG#0 App...