- /
- /
- /
SharePoint: Function to Create Default SharePoint Groups
When you create a site collection via PowerShell for some reason the default SharePoint Groups (members/Visitors/Owners) are not created.
With the following powershell code you create the default groups:
Function fCreateDefaultSharepointGroups($SPUrl) { try { $web = Get-SPWeb $SPUrl $web.CreateDefaultAssociatedGroups("","","") } catch [Exception] {} }