Create Site Using Template GROUP#0 Using PowerShell

devopsfj 256 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?

Microsoft 365 and Office SharePoint For business Windows
Windows for business Windows Server User experience PowerShell
0 comments No comments
{count} vote

2 answers

Sort by: Most helpful
  1. AllenXu-MSFT 24,941 Reputation points Moderator
    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 24,941 Reputation points Moderator
    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.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.