pnp / PnP-PowerShell

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

New-PnPSite is really slow after November release #2363

Open nstruds opened 4 years ago

nstruds commented 4 years ago

Notice: many issues / bugs reported are actually related to the PnP Core Library which is used behind the scenes. Consider carefully where to report an issue:

Reporting an Issue or Missing Feature

New-PnPSite cmdlet is really slow (+20minute for site creations)

Expected behavior

It usually finishes between 1-2 minutes.

Actual behavior

Steps to reproduce behavior

I'm using version 3.15.1911.0 Happens when I use either:

New-PnPSite -Type TeamSite -Title $alias -Alias $alias or New-PnPSite -Type CommunicationSite -Title $commSiteTitle -Url $commSiteUrl

I tried in two different tenants with the same problem using the same version. Also happens online through Azure Runbook. This doesn't happen with version 3.14.1910.0

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

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

3.15.1911.0

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.

MikkoKoskinen commented 4 years ago

Just came here to see if someone else is facing the same thing. Tested against two different tenant also. Site creation is taking +20 minutes or the site it self is created in the tenant but the call back to my script that the process was successful takes a long time.

erkanch commented 4 years ago

I had the same issue with both Nov and Oct updates. Went back to 3.13.1909.0 and it's resolved now. Run unistall-module untill all versions are removed and install 3.13.1909.0 using -requiredversion

zapftho commented 4 years ago

@erwinvanhunen told us that this is intended behavior now. Before the update site creation was not completely finished as Microsoft was running some background actions on site creation. Now Microsoft seems to provide a flag to allow PnP Powershell to know when the site creation is completely done. They are using this flag now to make sure that all site creation actions are finished.

MikkoKoskinen commented 4 years ago

I will also wait until the CSOM APIs issue that is currently active is fixed before making any conclusion regarding the speed. I also saw some 500 errors while testing this and at least those are related to the general issues on the APIs.

sparkitect commented 4 years ago

I believe it goes deeper: We are seeing the same behavior using PnP Core from CSOM C#

Glober777 commented 4 years ago

I've been experiencing the same issue, however I've noticed that if I specify the site owner as a parameter, the site creation takes around 20-25 seconds (although only for Communication site type and not for Team)

rsperre commented 4 years ago

By specifying -Wait:$false this check is skipped. Not sure why the behaviour is different when omitting the switch parameter:

var returnedContext = OfficeDevPnP.Core.Sites.SiteCollection.Create(ClientContext, creationInformation, noWait:!Wait);