SharePoint 2016 Fast Site Creation Via PowerShell (Real World Example)

SharePoint 2016 introduced a new feature called fast Site Collection creation. This feature has been there since the Preview version of SharePoint 2016. These features improve the site provisioning process. With the features, now we can save time. These are just copied operations at the content database level. With the help of this feature, we reduce the feature activation overhead.

Scenario

Krossfarm has some issue with the migration. After  troubleshooting, they found Fast Site Collection Creation, which causes a problem for migration and stopping it. Thus, they want to remove and disable Fast Site creation for MySite. Also, they want to enable the Fast Site creation for Team site templates for specific Web apps.

Task

  • Get the list of All Site collections template.
  • Remove SPSite master for the MySite template.
  • Disable the Fast Site Creation for MySite.
  • Enable the Fast Site Creation for Team Site.
  • Create New SpSIte Master for team template.

Get

Let's get the list of Site Master Web Template enabled for the Fast Site Collection creation

Get-SPWebTemplatesEnabledForSiteMaster

The output will be, as shown below but this just gives us the Template ID.



Now, we want to get the SpSiteMaster for the MySite template. An important thing is that we need a content database name in which this SPSIteMaster is provisioned. We can get it from central admin by going to Central admin > Application Management > view all site collection or you can find PowerShell.

$sp = Get-SPSite -Limit all | Where {$_.Url -Like "*Sitemaster*"}
$sp.ContentDatabase

The output will be, as shown below.



Now, we have the content database name. Let us run PowerShell, mentioned below to get the Spsite master

Get-SPSiteMaster -ContentDatabase "MySite_Content".

The output will be, as shown below.



Disable

Now, the  time to disable the Fast Site creation for MySite template has come. First, we have to remove the SPSiteMaster.

Remove-SPSiteMaster -ContentDatabase "MySite_ContentDB" -SiteId 43f58ec1-7f3c-4c36-844d-27fec849c827

We get the content database name and SiteID from the previous command.The output will be, as shown below.



Now,, disable the FastSiteCreation for MySite Template

Disable-SPWebTemplateForSiteMaster –Template SPSPERS#10

The output will be, as shown below.



Awesome, we successfully disabled the FastSite creation for the MySite template. Let’s move to next step, where we will enable the Fast Site creation for Team Template

Enable

To enable the Fast Site Creation for team Web app. We have to enable it first and create SPSiter Master.

Enable-SPWebTemplateForSiteMaster -Template STS#0 -CompatibilityLevel 15
Get-SPWebTemplatesEnabledForSiteMaster

The output will be, as shown below. You will see the STS#0 at the end of the list.



Now, create the SPSiteMaster for team template.

New-SPSiteMaster -ContentDatabase team_Content -Template STS#0
Get-SPSiteMaster -ContentDatabase "team_Content"

The output will be, as shown below.



Note

I just used this as an example. The situation varies in your environment. This example is just for learning purposes and to give you an idea of how to use the commands.