here you have the snippet
#New-SPSite doesn't create default SharePoint security groups
#Create new site collection default groups and change the title to the desrired one
#as per our framework requirements
$Sitename = 'SiteName'
$siteURL = 'siteURL'
try
{
write-host -foregroundcolor cyan $Sitename "Creating Default Association Groups......"
$web = Get-SPWeb $siteUrl;
# this symbol i:0#.w is presenting windows authentication security mechanism
$owner1 = $web.EnsureUser('domain\username')
$owner2 = $web.EnsureUser('domain\username')
$web.CreateDefaultAssociatedGroups($owner1,$owner2,$siteName);
$web.Title = 'DesiredTitle'
$web.Update()
write-host -foregroundcolor green $Sitename "Successfully created default association groups!"
}
catch [System.Exception]
{
write-host $Sitename "Default association groups creation failed."
}