If trying to create SharePoint Team site using PowerShell it will create the modern team site without connecting to the Microsoft 365 groups. I tried with template "STS#3".

I need to create modern team site which is connected with Microsoft 365 groups using SharePoint Online Management Shell. To resolve this issue, give me any suggestions...

1

There are 1 best solutions below

1
Emily Du - MSFT On

Please use following PowerShell to create a team site which is connected to the Microsoft 365 group.

Connect-PnPOnline "https://tenant.sharepoint.com/"
$teamSiteUrl = New-PnPSite -Type TeamSite -Title "Test" -Alias "test" -Description "test" -IsPublic