Forum Discussion
Possible to set default Members group for a site with PowerShell?
Bumping this as I'm time and again running into that issue that I have to change the default sharing group for a lot of sites. Still can't find a way how to achieve this. Has anyone ever found a solution for this? Thanks.
Deleted
This is a very good question. I don't have the developmental skills myself to whistle something up today but I do believe that it's possible. The PermSetup.aspx page when it's utilised sets three site parameters of (AssociatedOwnerGroup, AssociatedMemberGroup and AssociatedVisitorGroup).
Looking at the members of the https://docs.microsoft.com/en-us/powershell/module/sharepoint-online/get-sposite?view=sharepoint-ps command I don't see these as being available to manipulate, which I suspect rules out the SharePoint Online PowerShell Module.
I have seen an article on SharePoint Stackexchange that suggests this is possible via the SharePoint CSOM, which can be https://sharepoint.stackexchange.com/questions/240933/why-would-createdefaultassociatedgroups-stop-to-serverunauthorizedaccessexceptio. Hope that's of some use.
- colonel_claypooJul 17, 2020Iron Contributor
Steven Andrews, thanks for the pointers, that should help. I was also given this link which could be helpful: https://stackoverflow.com/questions/32760558/csom-set-make-default-group
Will test out when I have the time, thanks.