SharePoint 2016 IT Preview introduces a new feature called Fast Site Creation, which allows SharePoint administrators to quickly create site collections based on an existing template. This feature works at the SQL Server level, meaning that it simply copies artefacts in the SQL server directly without going through the SharePoint Object Model, thus generating multiple round trips back and forth between the SharePoint Servers and the SQL database in the back-end. Currently this feature is only available via PowerShell (which is good for us). I have no insights as to whether or not Microsoft is planning on adding a graphical interface component to Central Administration to allow us to interact with this feature.
From a PowerShell perspective, 6 new cmdlets have been introduced to help us manage the fast site creation feature:
1 2 3 4 5 6 | Disable-SPWebTemplateForSiteMaster Enable-SPWebTemplateForSiteMaster Get-SPSiteMaster Get-SPWebTemplatesEnabledForSiteMaster New-SPSiteMaster Remove-SPSiteMaster |
In this article we will go over what every single cmdlet listed above does.
Get-SPWebTemplatesEnabledForSiteMaster:
This cmdlet lists all Site Collection Templates that are “Fast Creation Enabled”:
Disable-SPWebTemplateForSiteMaster:
This cmdlet disables a site collection template that was “Fast Site Creation Enabled”. In the example below, we disable the STS#0 template:
Enable-SPWebTemplateForSiteMaster:
“Fast Site Creation Enables” a template. For example, after diasbling Fast Site Creation on template STS#0 above, if we wish to re-enable it, we need to run the following cmdlet:
New-SPSiteMaster:
Now that we have our Site Collection templates ready for Fast Site Creation, we need to create what we call a new Site Master. Think of a Site Master has being a cookie cutter. It is a blank “mould” from which all site collections created via Fast Site Creation will be made from. They will actually be a copy of that blank site master.
Get-SPSiteMaster:
Returns a reference to the Site Master associated with a content database:
Remove-SiteMaster:
You probably have guessed by now what that cmdlet does. Yeah, that’s right, it deletes a Site Master from a content database:
Now that we’ve looked at all the PowerShell cmdlets involved in SharePoint 2016’s Fast Site Creation, let’s see it in action. In order for us to create a new site collection using Fast Site Creation, all we have to do is call the New-SPSite cmdlet we all know and love, but this time we must make our call passing the new
1 | -CreateFromSiteMaster |
parameter:
1 | New-SPSite http://localhost/sites/FSC1 -Template STS#0 -CreateFromSiteMaster -ContentDatabase "WSS_Content" -OwnerAlias "Contoso\administrator" |
Ok, it’s not that impressive when you simply look at the outcome. It just creates a new site collection, so what right? What if I told you the creation process was about twice as fast using the Fast Site Creation method? While you may not care for a small SharePoint instance, imagine a large scale SharePoint instance (like Office 365) where you have to spin off hundreds of new site collections a day. Now it is starting to make sense.
Let us now compare the Fast Site Creation with the traditional method in terms of performance. Using the Measure-Command{} PowerShell method, we can compare the time it takes to create a new site collection using the SharePoint 2013 way versus how long it takes doing it the SharePoint 2016 (Fast Site Creation) way.
Traditional:
Measure-Command{New-SPSite http://localhost/sites/FSC2 -Template STS#0 -ContentDatabase “WSS_Content” -OwnerAlias “Contoso\administrator”}
Fast Site Creation (SharePoint 2016):
Measure-Command{New-SPSite http://localhost/sites/FSC3 -Template STS#0 -ContentDatabase “WSS_Content” -OwnerAlias “Contoso\administrator” -CreateFromSiteMaster}
Now you finally understand why this new way of creating site collections is so amazing!
One thought on “SharePoint 2016 – Fast Site Creation”