When you create a site in SharePoint Online, you always pick a site template – for example a Team site, a Communication site, or a classic site. Later, you may want to know which template was used or see the full list of templates available in your tenant.
In this tutorial, I will show you step‑by‑step how to get SharePoint site templates using PowerShell in two ways:
- Using the SharePoint Online Management Shell (Get‑SPOWebTemplate)
- Using PnP PowerShell (Get‑PnPTenantSite and related commands)
We will also see how to find the template of a specific SharePoint site, and some practical tips like filtering, exporting, and understanding the template IDs.
What is a SharePoint site template?
A SharePoint site template is basically a “blueprint” for your site.
It defines things like:
- The type of site (Team, Communication, Blog, Project site, etc.)
- The features that are enabled
- The layout and default pages
Each template has a Template ID such as:
STS#3– Team site (no Microsoft 365 group)GROUP#0– Group‑connected team siteSITEPAGEPUBLISHING#0– Communication site
Knowing these IDs is very handy when:
- You need to audit existing sites.
- You want to create sites via PowerShell using a specific template.
- You are troubleshooting why some features appear on one site but not on another.
Prerequisites
Before running any script, make sure you have the right modules installed and permissions in place.
Permissions
- You must be a SharePoint Online Administrator or Global Administrator to run tenant‑level commands such as
Get-SPOWebTemplateorGet-PnPTenantSite.
You need the below two modules.
- SharePoint Online Management Shell
Module: Microsoft.Online.SharePoint.PowerShell
Install from an elevated PowerShell window:
Install-Module -Name Microsoft.Online.SharePoint.PowerShell- PnP PowerShell (cross‑platform, works with PowerShell 7)
Install-Module -Name PnP.PowerShellIf your organization blocks Install-Module, check with your admin or install from an internal repository.
Get Site Templates Using SharePoint Online Management Shell
The SharePoint Online Management Shell gives you a quick way to list all templates that are available in the tenant.
Step 1: Connect to your admin center
You must connect to the SharePoint Online admin center URL, which usually looks like:
https://<tenant>-admin.sharepoint.comExample:
Connect-SPOService -Url https://szg52-admin.sharepoint.com -Credential (Get-Credential)When prompted, enter your SharePoint admin or global admin credentials.
Example 1: Get all SharePoint Online Site Templates
Once connected, run:
Get-SPOWebTemplateYou will see output with columns like Name, Title, and sometimes Description and DisplayCategory.
| Name | Title |
|---|---|
| STS#3 | Team site (no Microsoft 365 group) |
| STS#0 | Team site (classic experience) |
| BDR#0 | Document Center |
| DEV#0 | Developer Site |
| OFFILE#1 | Records Center |
| EHS#1 | Team Site – SharePoint Online configuration |
| BICenterSite#0 | Business Intelligence Center |
| SRCHCEN#0 | Enterprise Search Center |
| BLANKINTERNETCONTAINER#0 | Publishing Portal |
| ENTERWIKI#0 | Enterprise Wiki |
| PROJECTSITE#0 | Project Site |
| PRODUCTCATALOG#0 | Product Catalog |
| COMMUNITY#0 | Community Site |
| COMMUNITYPORTAL#0 | Community Portal |
| SITEPAGEPUBLISHING#0 | Communication site |
| SRCHCENTERLITE#0 | Basic Search Center |
| visprus#0 | Visio Process Repository |
Here is an exact output you can see in the screenshot below:

Check out Get All SharePoint Site Collections Using PowerShell
Example 2: Show Only Selected Properties
If you want a cleaner view, you can select only the columns you care about. The script to get the SharePoint site templates with selected properties:
Get-SPOWebTemplate | Select-Object Name, Title, DisplayCategoryThis gives you a nice, readable table with the template ID, friendly name, and category (like Collaboration, Publishing, etc.). You can see the exact output in the screenshot below:

Example 3: Get details for a specific template
Let’s say you only want the Team site (no Microsoft 365 group) template (STS#3).
Get-SPOWebTemplate | Where-Object { $_.Name -eq "STS#3"}| Select-Object Name, Title, DescriptionThis is very useful when you know the template ID and want to double‑check the description before using it in scripts.
You can see the exact output in the screenshot below:

Read Get SharePoint Site Members Using PowerShell
Example 4: Filter templates by category
Some templates are grouped under categories such as Publishing, Collaboration, or Custom.
If you only want templates under the Publishing category:
Get-SPOWebTemplate |
Where-Object { $_.DisplayCategory -eq "Publishing" } |
Select-Object Name, Title, DisplayCategoryYou can replace "Publishing" with other categories you find in your environment.

Tip: You can export the list to CSV for documentation using
Get-SPOWebTemplate | Select Name,Title,DisplayCategory | Export-Csv -Path "C:\Temp\SPOWebTemplates.csv" -NoTypeInformationThis is how to get all the SharePoint site templates from the SharePoint Online Management shell.
Check out Get SharePoint List Name using PowerShell
Get Site Template in SharePoint Using PnP PowerShell
PnP PowerShell gives you more flexibility and works well with PowerShell 7 on Windows, macOS, and Linux.
We’ll look at two common scenarios:
- Get all available templates similar to your existing script.
- Get the template for a specific site using tenant commands.
Connect to SharePoint using PnP PowerShell
For tenant‑level commands, connect to your Microsoft 365 tenant:
Connect-PnPOnline -Url https://szg52-admin.sharepoint.com -InteractiveThe -Interactive parameter opens a modern sign‑in window and supports MFA, which is now the recommended approach.
If you want to connect to a specific site instead (for context‑based calls), you can connect to the site URL directly:
Connect-PnPOnline -Url https://szg52.sharepoint.com/sites/YourSite -InteractiveExample 1: Get all available SharePoint site templates using PnP PowerShell
After connecting to SharePoint Online. Follow the below script to get all the SharePoint site templates:
Get-PnPSiteTemplateBut if we run this script, the output will be in the XML, as shown below:

If we need to get all the SharePoint site templates in a table format through pnp, follow the script below:
Get-PnPTenantSite -Detailed | ForEach-Object {
[PSCustomObject]@{
Template = $_.Template
Title = $_.Title
}
} | Format-Table -AutoSizeAfter executing the above script, we will receive many SharePoint site templates, such as:
| Name | Title |
|---|---|
| GLOBAL#0 | Global template |
| STS#3 | Team site (no Microsoft 365 group) |
| STS#0 | Team site (classic experience) |
| STS#1 | Blank Site |
| STS#2 | Document Workspace |
| MPS#0 | Basic Meeting Workspace |
| MPS#1 | Blank Meeting Workspace |
| MPS#2 | Decision Meeting Workspace |
| MPS#3 | Social Meeting Workspace |
| MPS#4 | Multipage Meeting Workspace |
| CENTRALADMIN#0 | Central Admin Site |
| WIKI#0 | Wiki Site |
| BLOG#0 | Blog |
| SGS#0 | Group Work Site |
| TENANTADMIN#0 | Tenant Admin Site |
| APP#0 | App Template |
| APPCATALOG#0 | App Catalog Site |
| ACCSRV#0 | Access Services Site |
| ACCSVC#0 | Access Services Site Internal |
| ACCSVC#1 | Access Services Site |
| BDR#0 | Document Center |
| CONTENTCTR#0 | Content Center |
| TBH#0 | In-Place Hold Policy Center |
| DEV#0 | Developer Site |
| EDISC#0 | eDiscovery Center |
| EDISC#1 | eDiscovery Case |
| EXPRESS#0 | Express Team Site |
| FunSite#0 | SharePoint Online Tenant Fundamental Site |
| OFFILE#0 | (obsolete) Records Center |
| OFFILE#1 | Records Center |
| EHS#0 | Express Hosted Site |
| EHS#2 | Public Publishing Portal |
| EHS#1 | Team Site – SharePoint Online configuration |
| OSRV#0 | Shared Services Administration Site |
| PPSMASite#0 | PerformancePoint |
| BICenterSite#0 | Business Intelligence Center |
| PWA#0 | Project Web App Site |
| PWS#0 | Microsoft Project Site |
| REVIEWCTR#0 | Review Center |
| RedirectSite#0 | Redirect Site |
| POLICYCTR#0 | Compliance Policy Center |
| SPS#0 | SharePoint Portal Server Site |
| SPSPERS#0 | SharePoint Portal Server Personal Space |
| SPSPERS#2 | Storage And Social SharePoint Portal Server Personal Space |
| SPSPERS#3 | Storage Only SharePoint Portal Server Personal Space |
| SPSPERS#4 | Social Only SharePoint Portal Server Personal Space |
| SPSPERS#5 | Empty SharePoint Portal Server Personal Space |
| SPSPERS#6 | Storage And Social SharePoint Portal Server Personal Space |
| SPSPERS#7 | Storage And Social SharePoint Portal Server Personal Space |
| SPSPERS#8 | Storage And Social SharePoint Portal Server Personal Space |
| SPSPERS#9 | Storage And Social SharePoint Portal Server Personal Space |
| SPSPERS#10 | Storage And Social SharePoint Portal Server Personal Space |
| SPSPERS#11 | Consumer OneDrive |
| SPSPERS#12 | JIT OneDrive Business |
| SPSPERS#13 | JIT OneDrive Consumer |
| SPSMSITE#0 | Personalization Site |
| SPSTOC#0 | Contents area Template |
| SPSTOPIC#0 | Topic area template |
| SPSNEWS#0 | News Site |
| CMSPUBLISHING#0 | Publishing Site |
| BLANKINTERNET#0 | Publishing Site |
| BLANKINTERNET#1 | Press Releases Site |
| BLANKINTERNET#2 | Publishing Site with Workflow |
| SPSNHOME#0 | News Site |
| SPSSITES#0 | Site Directory |
| SPSCOMMU#0 | Community area template |
| SPSREPORTCENTER#0 | Report Center |
| SPSPORTAL#0 | Collaboration Portal |
| SRCHCEN#0 | Enterprise Search Center |
| PROFILES#0 | Profiles |
| BLANKINTERNETCONTAINER#0 | Publishing Portal |
| SPSMSITEHOST#0 | My Site Host |
| ENTERWIKI#0 | Enterprise Wiki |
| PROJECTSITE#0 | Project Site |
| PRODUCTCATALOG#0 | Product Catalog |
| COMMUNITY#0 | Community Site |
| COMMUNITYPORTAL#0 | Community Portal |
| GROUP#0 | Team site |
| POINTPUBLISHINGHUB#0 | PointPublishing Hub |
| POINTPUBLISHINGPERSONAL#0 | Personal blog |
| POINTPUBLISHINGTOPIC#0 | PointPublishing Topic |
| SITEPAGEPUBLISHING#0 | Communication site |
| TEAMCHANNEL#0 | Team channel |
| TEAMCHANNEL#1 | Team channel |
| CSPCONTAINER#0 | CSP Container |
| SRCHCENTERLITE#0 | Basic Search Center |
| SRCHCENTERLITE#1 | Basic Search Center |
| TenantAdminSpo#0 | SharePoint Online TenantAdmin |
| TestSite#0 | Test Site |
| visprus#0 | Visio Process Repository |
| SAPWorkflowSite#0 | SAP Workflow Site |

You can use the client‑side object model via PnP to get the templates available for a specific web.
# Config variable
$SiteUrl = "https://szg52.sharepoint.com/"
# Connect to PnP Online
Connect-PnPOnline -Url $SiteUrl -Interactive
# Get context and current web
$ctx = Get-PnPContext
$web = Get-PnPWeb
# Get all available web templates (LCID 1033 = English)
$templates = $web.GetAvailableWebTemplates(1033, 0)
$ctx.Load($templates)
$ctx.ExecuteQuery()
# Show ID, Name, and Title
$templates | Select-Object Id, Name, TitleThis returns a list of templates very similar to the one in your existing article, including IDs like GLOBAL#0, STS#3, GROUP#0, SITEPAGEPUBLISHING#0, etc.
You can also export this list to CSV:
$templates |
Select-Object Id, Name, Title |
Export-Csv -Path "C:\Temp\PnpWebTemplates.csv" -NoTypeInformationCheck Add SharePoint Online List Items Using PnP PowerShell
Example 2: Get the template of all SharePoint sites in the tenant
If you want to see which template is used by each site in your tenant, you can use Get-PnPTenantSite.
Connect-PnPOnline -Url https://szg52-admin.sharepoint.com -Interactive
Get-PnPTenantSite -Detailed |
ForEach-Object {
[PSCustomObject]@{
Title = $_.Title
Url = $_.Url
Template = $_.Template
}
} |
Format-Table -AutoSizeThis gives you a table where the Template column contains values such as GROUP#0, STS#0, SITEPAGEPUBLISHING#0, etc.
If you want to save this in a CSV file, you can write the below script.
Get-PnPTenantSite -Detailed |
Select-Object Title, Url, Template |
Export-Csv -Path "C:\Temp\TenantSitesTemplates.csv" -NoTypeInformationExample 3: Get only team sites or communication sites
To show only classic team sites (STS#0):
Connect-PnPOnline -Url https://szg52-admin.sharepoint.com -Interactive
Get-PnPTenantSite -Template "STS#0" -Detailed |
Select-Object Title, Url, Template |
Format-Table -AutoSizeTo show only group‑connected team sites (GROUP#0):
Get-PnPTenantSite -Template "GROUP#0" -Detailed |
Select-Object Title, Url, Template |
Format-Table -AutoSizeTo show only communication sites (SITEPAGEPUBLISHING#0):
Get-PnPTenantSite -Template "SITEPAGEPUBLISHING#0" -Detailed |
Select-Object Title, Url, Template |
Format-Table -AutoSizeThis is very useful when you want to know how many team sites vs communication sites you have.
Check out Delete a SharePoint Online Site Using PowerShell
Example 4: Get the template for a specific SharePoint site
If you just need the template of one SharePoint site, use -Identity; here is the complete PowerShell script:
Connect-PnPOnline -Url https://szg52-admin.sharepoint.com -Interactive
Get-PnPTenantSite `
-Identity "https://szg52.sharepoint.com/sites/SharePointOnlineTraining" `
-Detailed |
Select-Object TemplateAfter executing the above script, we will get the SharePoint site template name as shown below:

You will get something like:
Template
--------
GROUP#0GROUP#0 means this site is a modern team site connected to a Microsoft 365 Group.
If you see STS#3, that is a modern team site without a Microsoft 365 Group.
Modern vs classic templates
Here are a few common template IDs you will use very often in SharePoint.
| Template ID | Description |
|---|---|
| STS#0 | Classic team site |
| STS#3 | Team site (no Microsoft 365 group, modern) |
| GROUP#0 | Group‑connected team site (modern) |
| SITEPAGEPUBLISHING#0 | Communication site |
| BLOG#0 | Blog site |
| PROJECTSITE#0 | Project site |
| COMMUNITY#0 | Community site |
In new tenants, Microsoft recommends using GROUP#0 (team site) and SITEPAGEPUBLISHING#0 (communication site) for most scenarios.
Classic templates such as STS#0 still exist but are mainly for backward compatibility.
In this tutorial, we discussed how to get SharePoint site templates using PowerShell.
Do let me know if these examples helps you!
You may also like the following tutorials:
- Connect-SPOService : current site is not a tenant administration site.
- Get SharePoint List Name using PowerShell
- Connect-PnPOnline : The term ‘Connect-PnPOnline’ is not recognized

After working for more than 18 years in Microsoft technologies like SharePoint, Microsoft 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (12 times). I have also worked in companies like HP, TCS, KPIT, etc.