1

I am reading about the Get-PnPProvisioningTemplate -Out template.pnp -IncludeSiteCollectionTermGroup from this link https://docs.microsoft.com/en-us/powershell/module/sharepoint-pnp/get-pnpprovisioningtemplate?view=sharepoint-ps.. but i have the following questions:-

  1. let say i apply the template generated from the above script using Apply-PnPProvisioningTemplate, to a new site inside the same tenant as the site i Get the template from. will the apply raise an error that the term group and term sets already exists? or it will automatically use the current term group and term sets?

  2. if i apply the template generated from the above script to a new tenant will i get the term group and term set automatically created? or i need first to create the term group before applying the template?

1 Answer 1

1

-IncludeSiteCollectionTermGroup will only export terms that are defined at the Site Collection level, not the terms in the managed term store. These terms are usually created when you define fields with custom term sets or when using Managed Navigation.

Therefore any terms in the managed term store (that are available across your sites in the tenant) will be untouched by these commands.

Your questions:

  1. Not unless you defined the exact same terms previously in the new site
  2. Yes, but again this only applies to site collection level terms.

Here you can see how the Site Collection terms appear under Term Store Management Tool:

enter image description here

The flag -IncludeAllTermGroups will include all terms, but a better way to handle export or import of these are by using the commands Export-PnPTaxonomy and Import-PnPTaxonomy .

Note: If importing to a new tenant, be sure to update the xml template with new accounts as owner for the terms...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.