Is it possible to change the Site sharing settings using PnP PowerShell or SPO PowerShell? This includes 'Sharing permissions' as well as 'Access Requests'. These settings for any site can be found under:

Settings > Site permissions > Change how members can share

Screenshot of Permissions tab

Screenshot of Site sharing settings tab


According to my research, there is currently no complete PowerShell command that can support to change the Site sharing settings. However, you can use the following workaround.

You can use the below PowerShell command to prevents non-owners of a site from inviting new users to the site.

Set-SPOSite -Identity https://contoso.sharepoint.com -DisableSharingForNonOwners

For more information, please refer to "Set-SPOSite".

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.