Create Site Using Template GROUP#0 Using PowerShell

devopsfj 196 Reputation points
2023-11-23T14:13:46.71+00:00

I have created a SharePoint site and configured the site via the UI, I am now looking to re-engineer this into a PowerShell script so it can be used across multiple environments.

When I create the site via the UI, I am using the Standard Teams template.

When running Get-SPOSite, the template ID which is brought back is 'GROUP#0'.

I am trying to create a site using New-SPOSite, however, when I use this template ID, I receive the below error:

PS> New-SPOSite -Url "$SharePointURL/sites/$SiteName" -Owner $UserEmail -Template "GROUP#0" -Title "Test Site" -StorageQuota '1000' -CompatibilityLevel 15 -LocaleId 1033 -Verbose  

The web template GROUP#0 is not available for sites on this tenant. 

Get-SPOWebTemplate does not include GROUP#0

Any ideas how to get around this?

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,249 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,306 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. AllenXu-MSFT 18,206 Reputation points Microsoft Vendor
    2023-11-24T07:58:48.89+00:00

    Hi @devopsfj,

    I could reproduce this issue on my site,

    User's image

    this seems to be something wrong in the backend of Microsoft. I am going to check this with my team and will update here when I know the cause. Thanks for your patience.

    Have a good day:)


    If the answer is helpful, please click "Accept as Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. AllenXu-MSFT 18,206 Reputation points Microsoft Vendor
    2023-11-27T06:47:24.94+00:00

    @devopsfj,

    I suggest you using this PnP command to create a Microsoft 365 group connected team site as a workaround:

    New-PnPSite -Type TeamSite -Title "Test Group" -Alias "TestGroup" -Description "Test group desc" -IsPublic
    
    
    

    If the answer is helpful, please click "Accept as Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.