Small Tips and Tricks – PowerShell – creating communication site – resolving error – New-SPOSite : The web template SITEPUBLISHING#0 is not available for sites on this tenant
Hi All,
Greetings for the day!!!
Today new issue and solution 🙂
Background
- In one of scenario we need to automate the process of creating COMMUNICATION sites
- So PowerShell is the option – New-SPOSite
- I am testing by creating a single site collection with PowerShell
- For communication site I thought template will be SITEPUBLISHING#0 but then got the issue with this template
Issue – Error while creating communication site with PowerShell – New-SPOSite : The web template SITEPUBLISHING#0 is not available for sites on this tenant

Solution
- It seems to be template getting used is wrong one- SITEPUBLISHING#0
- To know the available template in a tenant we have PowerShell CMDLET – Get-SPOWebTemplate
PS C:\> Get-SPOWebTemplate
output:
Name Title LocaleId CompatibilityLevel
---- ----- -------- ------------------
STS#3 Team site (no Microsoft 365 group) 1033 15
STS#0 Team site (classic experience) 1033 15
BDR#0 Document Center 1033 15
DEV#0 Developer Site 1033 15
OFFILE#1 Records Center 1033 15
EHS#1 Team Site - SharePoint Online configuration 1033 15
BICenterSite#0 Business Intelligence Center 1033 15
SRCHCEN#0 Enterprise Search Center 1033 15
BLANKINTERNETCONTAINER#0 Publishing Portal 1033 15
ENTERWIKI#0 Enterprise Wiki 1033 15
PROJECTSITE#0 Project Site 1033 15
PRODUCTCATALOG#0 Product Catalog 1033 15
COMMUNITY#0 Community Site 1033 15
COMMUNITYPORTAL#0 Community Portal 1033 15
SITEPAGEPUBLISHING#0 Communication site 1033 15
SRCHCENTERLITE#0 Basic Search Center 1033 15
visprus#0 Visio Process Repository 1033 15
- If we notice, correct template for communication site is – SITEPAGEPUBLISHING#0

- As we are using correct template , communication site created successfully
New-SPOSite -Url "https://knowledgejunction1.sharepoint.com/sites/sitewithpowershell" -Owner "prasham@knowledgejunction1.onmicrosoft.com" -StorageQuota 20480 -Title "Communication site with PowerShell" -Template "SITEPAGEPUBLISHING#0"
Thanks all for reading 🙂 HAVE a FANTASTIC LEARNING AHEAD !!!
You must be logged in to post a comment.