Fast Site Collection Creation Feature In Sharepoint Server 2016

SharePoint 2016 introduced the fast site collection creation feature which provides a huge performance improvement by reducing the time taken to create the site collection. The reduction in the creation time is due to the basic fact that the site collection creation happens at the content database level, by copying from an existing site collection template. The traffic between SharePoint Server and Database is significantly reduced as a result of this approach. As of now, fast site collection creation is supported only through PowerShell and not through UI.

SharePoint

Before jumping into site collection creation, we have some background work to do as we have to set up site templates used in fast site collection creation. We will be doing this using SharePoint 2016 Management Shell. 6 new cmdlets have been introduced in SharePoint 2016 to help us work with the fast site creation feature.

  • Disable-SPWebTemplateForSiteMaster
  • Enable-SPWebTemplateForSiteMaster
  • Get-SPSiteMaster
  • Get-SPWebTemplatesEnabledForSiteMaster
  • New-SPSiteMaster
  • Remove-SPSiteMaster
Get-SPSiteMaster

There are a couple of site templates that support fast site collection creation. So, let’s find out those site templates. We can use the below command to get the templates that support fast site collection creation.

Get-SPWebTemplatesEnabledForSiteMaster

SharePoint

The site template IDs that support fast site collection creation are,
  • SPSPERS#2 
  • SPSPERS#6 
  • SPSPERS#7 
  • SPSPERS#8 
  • SPSPERS#9 
  • SPSPERS#10 
Enable-SPWebTemplateForSiteMaster
 
If we want to create a site collection in the fast way by using a different site template say : Team Site or Wiki Site, we will have to enable fast site collection creation feature for that particular site template using the below script.

Enable-SPWebTemplateForSiteMaster -Template "Site Template ID" -CompatibilityLevel 15

Let’s enable fast site collection creation for Team site and Wiki Site which has a site template id of STS#0 and WIKI#0 respectively. Since this command is specific to a template, if we want to activate another site template for fast site collection creation, we will have to run it for each required site template.

Enable-SPWebTemplateForSiteMaster -Template "WIKI#0" -CompatibilityLevel 15

Enable-SPWebTemplateForSiteMaster -Template "STS#0" -CompatibilityLevel 15

SharePoint

Disable-SPWebTemplateForSiteMaster

If we want to disable the site template from being used for fast site collection creation, we can use the script.

Disable-SPWebTemplateForSiteMaster -Template "WIKI#0"

Get-SPWebTemplatesEnabledForSiteMaster

Let’s run the Get-SPWebTemplatesEnabledForSiteMaster command to get the templates that can be used for fast site collection creation. We can see Wiki and Team site template has been added to the list as shown below.

SharePoint

Create Site Master

Before starting with site collection creation, we will need a site master set up in Content database. A site master is basically a blank site collection (based on the site template used to create site master) that contains the features that have to be activated on fast site collection creation. Since the Site Master is used to create in the fast site collection process, the time taken to activate features and other settings is saved since we are creating the site collection using the Site Master which acts as predefined site collection mould.

We can see the existing site masters using the command:

Get-SPSiteMaster -ContentDatabase WSS_Content

SharePoint

Since we are trying to create a site collection based on Team Site and a site master for that template is not listed above, we will have to create a new site master.

So, the bottom line is, we have to make sure that a site master based on the site template which we will use for fast site collection creation is already present in the content database. If it is not present we have to create a new site master using the command.

New-SPSiteMaster -ContentDatabase WSS_Content -Template STS#0



As you can see the site master has already listed out which all features to be activated when a fast site is created/copied from it.

Fast Site collection creation

Once the site master is created, we can create the site collection using the command.

New-SPSite "http://SharePoint2016/sites/FAST Site" -ContentDatabase "WSS_Content" -CompatibilityLevel 15 -CreateFromSiteMaster -Template "STS#0" -OwnerAlias "SharePointHOL\Priyan"

SharePoint

To my surprise, the site collection got created in around 40 seconds which is a drastic improvement as compared to the previous versions. The real improvement is because of the reduction in the database round trips which happens in the traditional methods. With Fast Site Collection creation the site collection creation happens at the content database level. Moreover what happens during the site collection creation is that the site collection is copied from the Site Master which has all the features to be activated and settings already setup. If we navigate to Central Admin we can see the newly created site collection and the site masters listed.

SharePoint

Though you might not feel that impressed with the reduction in the time in site collection creation, yet it would really make sense when you have to create 100+ site collections in a day for a requirement. Once the site collection creation is done and if you no longer need the Site Master you can delete it using the command.

Remove-SPSiteMaster -ContentDatabase "ContentDB Name" –SiteId “SiteMasterId”

SharePoint

Thus, the Sitemaster has been removed from the Content Database.

Note The Site Master ID can be obtained using Get-SPSiteMaster -ContentDatabase WSS_Content

SharePoint

Summary - Thus, we saw how to make use of the fast site collection creation feature in SharePoint Server 2016.