How to create/recreate default SharePoint groups for a site
After a query on the internet, it seems that it is not so easy to find this information, unless you receive an error like: "The groups required to manage users for your site are missing" (this was observed in the SharePoint Online - the version on the servers is 2010, moving to 2013 now – when trying to share the site with external users). If you will look for the error, you will find the best way of doing it - using the direct URL: <siteURL>/_layouts/permsetup.aspx (in the KB article: https://support.microsoft.com/kb/2632494 - Error when you invite external users to your site: "The groups required to manage users for your site are missing" ).
Some other solutions can be used too:
Going to a created group, then in Settings you can choose the Make
Default Group (I am not sure you can create a default Visitors group, but the Members
seems to work)For the on premises (not online), the CreateDefaultAssociatedGroups method of the SPWebobject can be used to recreate them
- check MSDN for details: https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.createdefaultassociatedgroups.aspx - SPWeb.CreateDefaultAssociatedGroupsmethod
- or how to use it with STSADM: https://blog.falchionconsulting.com/index.php/2009/04/creating-default-site-groups-after-creating-site-collections-using-stsadm/ - Creating Default Site Groups After Creating Site Collections Using STSADM
The above recommendations can be used for: SharePoint Online, SharePoint 2010, SharePoint 2013 (Foundation or Server, I did not test in 2013)