pnp / PnP-PowerShell

SharePoint PnP PowerShell CmdLets
https://pnp.github.io/powershell
Other
985 stars 665 forks source link

New-PNPSite Creates O365 Group instead of Modern Site #2209

Open sohailmerchant opened 4 years ago

sohailmerchant commented 4 years ago

Reporting an Issue or Missing Feature

The cmdlet New-PnpSite creates a modern group site and New-PnPTenantSite create a classic site. How do I create a modern SharePoint only not connected to Group

Expected behavior

New-PnPSite to create a modern SharePoint site rather than group as we have New-UnifiedGroup cmdlet.

Actual behavior

Office 365 Group site created.

Steps to reproduce behavior

New-PnPSite will create a private group

Which version of the PnP-PowerShell Cmdlets are you using?

What is the version of the Cmdlet module you are running?

3.12

How did you install the PnP-PowerShell Cmdlets?

ghost commented 4 years ago

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

gautamdsheth commented 4 years ago

You need to use the STS#3 template to create modern site without O365 group.

Use the snippet below:

Connect-PnPOnline -Url https://tenant-admin.sharepoint.com

New-PnPTenantSite `
  -Title "Modern Team Site" `
  -Url "https://tenant.sharepoint.com/sites/modernteamsite" `
  -Description "Modern Team Site without group" `
  -Owner "admin@tenant.onmicrosoft.com" `
  -Lcid 1033 `
  -Template "STS#3" `
  -TimeZone 10 `
  -Wait
sohailmerchant commented 4 years ago

Thanks I realised this after doing few experiments. My point is documents is not accurate and needs updating. If someome just read three cmdlets docs they will see what I mean. Thanks

kachihro commented 4 years ago

Doco includes this in description ;

The New-PnPSite cmdlet creates a new site collection for the current tenant. Currently only 'modern' sites like Communication Site and the Modern Office 365 group-connected team sites are supported. If you want to create a classic site, use New-PnPTenantSite.