Goal: Use PowerShell to create the default permissions groups (Owners, Visitors, Members) after site collection being created with PowerShell.
I Logged into the Application server with a farm admin account, running PowerShell as admin:
$web = Get-SPWeb $siteCollectionUrl $web.CreateDefaultAssociatedGroups("DOMAIN\sitecollectionadmin", "", "")
I am getting below result:
Exception calling "CreateDefaultAssociatedGroups" with "3" argument(s): "Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))"
Is there any specific permission I need to grant the account that I am using to run PowerShell so I don't get the Access denied error?