The other day a customer asked me why when they access to SPO TS, appears the owners an option saying that a Team has not been associated with a SharePoint Online site, like the image above:
In same scenarios this could lead a problem, taking into account that this kind of things should be governed from the governance plan.
In this case, we can use some PowerShell to hide some propertybags in SPO to hide this option to all users, leading to us to create Teams from the admin site directly.
So we can execute the following:
$tenant = "https://spotenant-admin.sharepoint.com"
$web = "https://spotenant.sharepoint.com/sites/Modernsposite"
Connect-PnPOnline -Url $tenant -SPOManagementShell
$site = Get-PnPTenantSite -Detailed -Url $web
if ($site.DenyAddAndCustomizePages -ne 'Disabled') {
$site.DenyAddAndCustomizePages = 'Disabled'
$site.Update()
$site.Context.ExecuteQuery()
}
Set-PnPPropertyBagValue -Key 'TeamifyHidden' -Value 'True'
Once this has been done, if you refresh the homepage after setting the value, the dialog box to create Teams should no longer appear.