If you’ve been dabbling in SharePoint 2010's new hosting (multi-tenant) environment and been creating host-named site collections, you have may noticed that the default SharePoint security groups typically created by default are not there in the root web.  These include:

<Site Name> Members

<Site Name> Owners

<Site Name> Visitors

These are created by the SharePoint API, and apparently isn’t called properly when host-named site collections are created through PowerShell in a multi-tenant environment.  This ONLY happens in a multi-tenant environment.  Even if you create the host-named site collections through PowerShell in a non-hosted environment, the first time you visit the site, you might be prompted to choose the site template and to create the default security groups.

So how do we get them back without creating them manually?  Use this PowerShell script.  I didn’t write it, but received it after working with Microsoft.

$url =  "http://intranet.contoso.com"
$web = Get-SPWeb -Identity $url
$web.CreateDefaultAssociatedGroups("","","")
$web.update()
$web.dispose()

** Make sure to replace the listed URL within the quotes with the URL of the site you want.

If you’re not using PowerShell ISE, you should be!!