I made a few new Sharepoint groups in one of my test site collections. I can see them in the web interface, I can work with them, so everything seems to be fine. But I cannot use these groups with powershell. This script:
$site = New-Object -Type Microsoft.SharePoint.SPSite -ArgumentList "https://mysite"
$groups = $site.RootWeb.Groups
foreach($i in $groups)
{
write-host $i.name
}
Returns all other groups, but not the new ones. The site was recently restored from a site collection backup and that looks like a break point. Is there any way to fix it?