function AddGroupToSite ($web, $groupName, $description, [bool]$allowMembersEditMembership = $true)
{
    $web.SiteGroups.Add($groupName, $web.Site.Owner, $web.Site.Owner, $description)
    $newGroup = $web.SiteGroups[$groupName]
    $newGroup.AllowMembersEditMembership = $allowMembersEditMembership
    $newGroup.Update()


    Write-Host "Создана новая группа: " $groupName
    return $newGroup
}