Created
June 20, 2022 12:00
-
-
Save aflyen/d7d99c94d8e5f83d078b48d942caa11c to your computer and use it in GitHub Desktop.
Use PnP.PowerShell to set a property bag value to hide the Teamify dialog in modern SharePoint sites. This requires the "DenyAndAddCustomizePages" setting on the site to be temporary disabled. A more recommended approach can be found here: https://gist.github.com/aflyen/0bcf8ce02ca52cbc5ab5ab8b2a48ca8f
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Connect to the site | |
Connect-PnPOnline -Url "https://contoso.sharepoint.com/sites/Project101" | |
# Temporary disable setting to allow access to the property bag | |
Set-PnPSite -DenyAndAddCustomizePages $false | |
# Set value in property bag | |
Set-PnPPropertyBagValue -Key "TeamifyHidden" -Value "TRUE" | |
# Re-enable setting to keep recommended security level | |
Set-PnPSite -DenyAndAddCustomizePages $true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment