Office 365 – PowerShell script to import all the term groups using PnP PowerShell

Hi All,

Today we will discuss how to import all our term sets in our SharePoint tenant using PnP PowerShell. PnP community provides us the PowerShell cmdlet “ImportPnPTermGroupFromXml” – which enables us to import term groups from XML file.

Here in following PowerShell script we will import all our termsets using XML file.

Following is the XML file which we will use to import:

Parameters which we need for PowerShell script are

  1. XML file path – We will need XML file path from which we need to import our termsets.
  2. Credential file path – Text file which contains two lines having UserName and Password. This is just so that we will not hardcode user name and password anywhere. Also then we can make tenant specific credential file.

PowerShell script:

References:
Import-PnPTermGroupFromXml
Import-PnPTermGroupFromXml

Thanks for reading 🙂

Keep reading, share your thoughts, experiences. Feel free to contact us to discuss more. If you have any suggestion / feedback / doubt, you are most welcome.

Stay tuned on Knowledge-Junction, will come up with more such articles

Advertisements

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.