Hide the template gallery from newly created sites in SharePoint

When you create new team or communication sites in SharePoint, the first user that visits will be presented with a template gallery picker:

This is a great feature for simpler solutions or where you utilize the Site Design to apply your solution. For organizations using their own provisioning solution the site might already be ready to use for the end-user and this dialog might cause confusion, and even end up in the user breaking your ready made site with their own template.

Disable the template dialog with PowerShell

Using the PnP.PowerShell module (https://pnp.github.io/powershell/) you could in example run this after applying a provisioning template:

Disable the template dialog with C#

If you are using the PnP.Framework for C# (https://github.com/pnp/pnpframework) you could add this code to your solution to disable the dialog:

Summary

The web template dialog adds a great capability for basic usage, or even when using Site Design, but can cause unnecessary confusion where you have a enterprise grade provisioning solution. In these cases it can make sense to disable the dialog.