Skip to content

Instantly share code, notes, and snippets.

@kilasuit
Created November 11, 2021 13:30
Show Gist options
  • Save kilasuit/7f50ae432a9a2f70e8e2ec6ecf60f995 to your computer and use it in GitHub Desktop.
Save kilasuit/7f50ae432a9a2f70e8e2ec6ecf60f995 to your computer and use it in GitHub Desktop.
PnP Content type to Site Design
$tenant = "myo365tenant"
$SiteURL = "https:://$tenant.sharepoint.com/sites/contenttypehub"
$group = 'Custom Content Types'
Connect-PnPOnline -url $SiteUrl -Interactive
Get-PnPContentType | Where Group -eq $group | Foreach {
@"
{
"verb": "addContentType",
"name":"$_"
},
"@ } | Set-Clipboard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment