GitHub Icon Image
GitHub

Disable Web Templates Gallery First Run Dialog

Summary

When accessing a newly created site collection in SharePoint Online, you are presented with a dialog to select a web template. This script will disable this dialog.

Example Screenshot

  • PnP PowerShell

#connect to the site collection using one of the many options available in PnP PowerShell
$localConn = Connect-PnPOnline -Url $siteUrl -ClientId $ClientId -CertificateBase64Encoded $CertificateBase64Encoded -Tenant $TenantName -ReturnConnection -erroraction stop
                
$Web = Get-PnPWeb -Includes WebTemplatesGalleryFirstRunEnabled -connection $localConn
$Web.WebTemplatesGalleryFirstRunEnabled = $false
$Web.Update()
Invoke-PnPQuery -connection $localConn        

Check out the PnP PowerShell to learn more at: https://aka.ms/pnp/powershell

The way you login into PnP PowerShell has changed please read PnP Management Shell EntraID app is deleted : what should I do ?

Contributors

Author(s)
Kasper Larsen

Disclaimer

THESE SAMPLES ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.

Back to top Script Samples
Generated by DocFX with Material UI