Create Groups with PowerShell

Brass Contributor

We have a PowerShell that create Microsoft Groups based on a CSV file. After creating a group, we would like to set a lot of settings - doclibrary versionhistory, language, local time...

 

The provision process for a sitecollection takes so long after creating a groups.

 

Our steps:

- Create Microsoft Groups (check) (we use: $session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $userCredentials -Authentication Basic -AllowRedirection)

 

- The SiteCollection will create, after click "go to teamsite" in the welcome message (not check, but in work - actual it's a manual job)

 

....the provision process takes over 2 hour... :(

 

- only after fnishing the provision process, we can set the settings

 

Has anybody a tipp or a solution, that performs the provisioning process in a shorter time and create Microsoft Groups faster over PowerShell?

 

Thanks a lot,

Dave

5 Replies

Well, we have discussed this on different forums...the problem you are having (even I'm seeing improvements) is well known...I think you might consider to create the Groups using the Graph @Tony Redmond @Christophe Fiessinger @Vesa Juvonen 

@Juan Carlos González Martín thanks for your feedback. We have tested this with Graph, but same issues...and with graph we can't set specific settings...

@Juan Carlos González Martín The provisioning over the api takes so long, more hours (2-4h). When i manually create a groups, it's so fast - i wish this with PowerShell also.

 

After the provisioning, a group is created and also a sharepoint, but appears the following error:

********************************
Sorry, something went wrong
 
 
Can't load the application on this page. Use the browser Back button to retry. If the problem persists, contact the administrator of the site and give them the information in Technical Details.

 

 

 

 

 

Aren't you looking for New-PnPUnifiedGroup?

Perhaps that's off-topic for this conversation, at least nothing about the powershell. The story is on some of our old (and not very old) group sites we received exactly the same error and behaviour.

 

Support had no solutions for weeks. Eventually found this post https://support.microsoft.com/en-us/help/2994143/sorry-we-couldn-t-load-this-app-error-when-you-try-..., decided to play with regional settings on one of our group sites. The only thing i did that's change Time Zone from UTC-12 (have no idea how it appeared) on our current time zone. Nothing more. Now everything works.