SharePoint 2013 HNSC Missing Default Groups

Overview

In a previous post, “SharePoint 2013 Host Named Site Collections over SSL”, I outlined creating a HNSC however it appears when creating a site collection through PowerShell (New-SPSite) instead of using Central Administration the default groups (Visitors, Members, Owners) are missing.  For example, if I navigate to Site Settings –> Site Permissions on a Site Collection created with PowerShell it’s clear that the default groups are missing:

image

Create Default Groups in the UI

One way to add these groups after the fact is to navigate to the permsetup.aspx page located at:

This will bring up a page titled “Set Up Groups for this Site” and will allow you to not only create the “Visitors”, “Members”, and “Owners” groups, but will also provide the ability to setup the initial group membership as well.

image

Now if I return to Site Settings –> Site Permissions I’ll notice that the default groups are present.

image

Create the Default Groups in PowerShell

Looking back at the original article I should have added some logic to create default groups in my script.  There’s a SPWeb.CreateDefaultAssoicatedGroups method that can be used for this purpose and is outlined on MSDN.  Below is a PowerShell code sample that can be used to create the default groups:


# Create the Default Groups (Visitor, Member, and Owners)
$url = “http://teams.2008r2.local”
$PrimaryLogin = “2008r2\SPInstall”
$SecondaryLogin = “2008r2\Jason”

$web = Get-SPWeb $url
$web.CreateDefaultAssociatedGroups ($PrimaryLogin, $SecondaryLogin, “”)

Advertisements
Tagged with: , ,
Posted in HNSC, PowerShell, SharePoint 2013
One comment on “SharePoint 2013 HNSC Missing Default Groups
  1. There is still an issue, if you delete the “excel services viewers” group, it breaks the site administration link to “people and groups”. Even if I make another group the default group the link still breaks.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: