This SharePoint tutorial explains, how to get the SharePoint site template using PowerShell. We will retrieve site template id and name using PowerShell in SharePoint 2013/2016.
We required site template id while creating a SharePoint site using PowerShell.
However, for PowerShell to accept it, you must provide it the Template ID (for example APPCATALOG#0).
When creating a new site collection from Central Administration, we can select a site template from the Template Selection section.
But sometimes we may need to create sites from the PowerShell using cmdlet commands. At that time we need to provide the site template name, not the site template Title.
get sharepoint site template id PowerShell
One can easily use the Get-SPWebTemplate command to get a list of all the templates in the SharePoint environment which we can run using PowerShell ISE also.
For example, to create an App Catalog site:
New-SPSite -Url http://sp:1001/sites/AppCatalog -OwnerAlias "serverName\sp_admin" -Name "App Catalog site" -Template "APPCATALOG#0"
Here is the SharePoint 2013 Site Template ID which we retrieved using PowerShell:
You may like following SharePoint tutorials:
- SharePoint Provisioning did not succeed. Details: The site template was not provisioned successfully
- SharePoint 2019 modern Team site template missing while creating subsites
- Unable to see all site templates category in Template Selection while creating subsite in SharePoint 2013
- SharePoint 2013 Missing Blank Site Template
- Enable blank site template SharePoint 2013/2016/2019
- Activate Group Work Site Template in SharePoint 2013
- Site definition vs Site template in SharePoint 2013/2010
- Easy way to identify site template used in SharePoint site
- Get SharePoint Online Site and List Templates using PowerShell
- Save site as template option missing in SharePoint online
- How to find which template is used for a site in SharePoint Online Office 365
This tutorial, we learned how to get sharepoint site template id and title using Powershell.
Solutions. I am currently working on Sharepoint 2010, MOSS 2007, Sharepoint 2013,Sharepoint 2013 App Dev, C#, ASP.NET, and SQL Server 2008.
Download SharePoint Online Tutorial PDF FREE!
Get update on Webinars, video tutorials, training courses etc.