1

I am looking for some help with pnp powershell to see if below would be possible to do:

  • Once a modern team site collection is created, I would like to set Sharing setting for the same to 'New and Existing Guests', see screenshot below. In my tenant, it defaults to 'Existing Guests' when a site is created so I want that to change to NEw and existing guests via powershell.

enter image description here

Can someone please help with powershell script to perform the same if its doable, thanks in advance.

2

This is only settable by using the SPO cmdlets as this is an administrator-level setting.

You can use Set-SPOSite.

Connect-SPOService https://tenantName-admin.sharepoint.com
Set-SPOSite https://tenantName.sharepoint.com/sites/siteCollection -SharingCapability ExistingExternalUserSharingOnly
2
  • Thanks a lot Trevor. I want to set it to 'new and existing guests', what would be the parameter for that. I believe ExistingExternalUserSharingOnly would set it to 'Existing guests only' option. – mdevm Oct 14 '20 at 15:39
  • See the cmdlet help I linked. It provides the information you need. – Trevor Seward Oct 14 '20 at 15:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.