I have this CSOM in my PowerShell script:
$Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($url) $SPOCredentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($userName,$password) $Ctx.Credentials = $SPOCredentials $web = $ctx.web $ctx.Load($web) $web.RequestAccessEmail = "" $web.MembersCanShare = $true; $web.AssociatedMemberGroup.AllowMembersEditMembership = $false; $web.Update() $Ctx.ExecuteQuery()
However, despite executing without errors and successfully disabling access requests, I end up with allowing site members to be added and sharing of files and folders disabled. It should be the opposite, as below.
Can anyone help please?