Remove the Teamify link on Group sites
Summary
If your governance dictate that Group owners should not be able to change a Group site to a Teams site, you can remove the promote link with this script.
Remove the Teamify link on Group sites
#connect to the site using one of the many options available
$conn = Connect-PnPOnline -Url $url -interactive -ReturnConnection -ErrorAction Stop
#enable custom script on site
Set-PnPSite -Identity $url -NoScriptSite $false -Connection $conn
#Update the Property bag key to remove Teams Prompt
Set-PnPPropertyBagValue -Key "TeamifyHidden" -Value "True" -Connection $conn
#Disable custom script on site or leave it enabled, it will automatically be disabled after 24 hours
Set-PnPSite -Identity $url -NoScriptSite $true -Connection $conn
#alternatively use Set-PnPTeamifyPromptHidden
Set-PnPTeamifyPromptHidden -Connection $conn
Check out the PnP PowerShell to learn more at: https://aka.ms/pnp/powershell
The way you login into PnP PowerShell has changed please read PnP Management Shell EntraID app is deleted : what should I do ?
Contributors
Author(s) |
---|
Kasper Larsen |
Reshmee Auckloo |
Valeras Narbutas |
Disclaimer
THESE SAMPLES ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.