Contents

Create sites using Fast Site Collection feature in SharePoint Server 2016

 

Fast Site Collection Creation is a new feature in SharePoint 2016, that enables Site Collections to be created in a much faster way that in previous versions.

This feature actually uses a copy of a site template which is stored in the content database, with all the site’s features already enabled. If a SharePoint administrator has a requirement for creating 50 Team Sites, enabling Fast Site Collection creation is a time saver in the long run.

Enablement
When we enable a template, we enable it for a particular content database. Meaning outside this database, it will not be a template for Fast Site Collection creation.

In today’s post, we will:

  • Enable Fast Site Collection creation,
  • Create the Master template,
  • Create a Site Collection using this master template,
  • Time comparaison between a Site Collection created with/without Site Master…
     

Enable templates for Fast Site Creation

Before being able to use this feature, we need to enable it.

Open the SharePoint Management Shell, or any editor you like with the SharePoint snapin added. Here I’m using Visual Studio Code. Let’s have a look at the PowerShell cmdlet for this feature:

/images/powershell-screenshots/create-site-fast-site-creation-img1.png
 

Now let’s think about which Site template we wish to enable for fast creation. To get a list of all the Site Templates (in “15” compatibility mode) and their ID, let’s run: Get-SPWebTemplate | Where-Object {$_.CompatibilityLevel -eq "15"}

The most popular is obviously the Team Site (STS#0), and a random pick could be…. a News Site! (SPSNHOME#0) So let’s go ahead, and enable those two (2) templates for Fast Site Collection creation using the Enable-SPWebTemplateForSiteMaster cmdlet.

1
2
Enable-SPWebTemplateForSiteMaster -Template "STS#0" -CompatibilityLevel "15"
Enable-SPWebTemplateForSiteMaster -Template "SPSNHOME#0" -CompatibilityLevel "15"

OK, what’s next? Well, we need to “store” those 2 templates in the content database!
 

Create the Site Master in the content database

Now that we have enabled those 2 templates for fast creation, we need to store them in the content database. From the new cmdlets, we have New-SPSiteMaster. And that’s the one we’ll use.

I have a Web Application named “Demo”, and its associated database is “SP2016_Demo_WADB”.

New-SPSiteMaster -ContentDatabase "SP2016_Demo_WADB" -Template "STS#0"

Let’s check what we’ve got using the Get-SPSiteMaster cmdlet: Get-SPSiteMaster -ContentDatabase "SP2016_Demo_WADB"

/images/powershell-screenshots/create-site-fast-site-creation-img2.png
 

We can also notice the two (2) Site Master templates in Central Admin:

/images/powershell-screenshots/create-site-fast-site-creation-img3.png
 

Create Site Collection(s) using Site Master

The only difference when creating a Team Site with PowerShell now, is the parameter -CreateFromSiteMaster. Below, I have inserted the Measure-Command to see how long it will take for the Site Collection to be created.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
Measure-Command { $newSPSite = @{
    Url                  = "http://demo.pwsh.net/sites/myfastsite"
    OwnerAlias           = "pwsh\SPInstall"
    CreateFromSiteMaster = $true
    Name                 = "My Fast Team Site"
    Template             = "STS#0"
    ContentDatabase      = "SP2016_Demo_WADB"
}
    New-SPSite @newSPSite 
}

Notice on line 4? “CreateFromSiteMaster“ is set to $true, so that’s where the template will be “pulled” from. Now let’s run that and… 🎉

/images/powershell-screenshots/create-site-fast-site-creation-img4.png
 

Let’s create our News Site to see how long it takes…. 24 seconds!

/images/powershell-screenshots/create-site-fast-site-creation-img5.png
 

Thanks for reading!