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.
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:
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.
|
|
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"
We can also notice the two (2) Site Master templates in Central Admin:
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.
|
|
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… 🎉
Let’s create our News Site to see how long it takes…. 24 seconds!
Thanks for reading!