Forum Discussion
Oct 05, 2016
Changing the "Allow members to share" SharePoint site Access Requests setting using Office Dev PnP
How can I set the "Allow members to share the site and individual files and folders" setting using the Office Dev PnP Provisioning Engine or PowerShell commands? I haven't found this specific setting...
Justin-GOV
Sep 16, 2022Brass Contributor
Also an option:
Connect-PnPOnline -ClientId "<your Azure App Registration Client ID>" -Thumbprint "<your certificate thumbprint>" -Url "<your site URL>" -Tenant "<your Tenant name>.onmicrosoft.com"
$membersGroupID = (Get-PnPGroup -AssociatedMemberGroup).id
Set-PnPGroup -Identity $membersGroupID -AllowMembersEditMembership $false