Provision Site Collection termsets and terms in office 365
using Powershell+ CSOM



Posted on October 6th, 2014

In this post you will learn how to provision site collection termsets and terms in office 365 using Powershell + CSOM.

Prerequisites:

I have created a folder called scripts and placed the required SharePoint client dlls.

Below are the list of dlls i need for execution of script.

  • Microsoft.SharePoint.Client.dll
  • Microsoft.SharePoint.Client.Runtime.dll
  • Microsoft.Online.SharePoint.Client.Tenant.dll
  • Microsoft.SharePoint.Client.Taxonomy.dll

I created an xml file where we can specify the Term sets and Terms without predefined GUIDs. You can see the structure of the xml file below, so you can run the same script for different site collections.

Below one is final folder structure where i have all the dlls, xml file and powershell script which need to be run to create site collection taxonomy group, term sets and terms.

Powershell script:

The below scripts creates term sets and terms at site collection level based on details specified in the xml. It also validate if the term sets and terms specified in the xml is already exist. If they are exist it will notify the user running the script.


Conclusion:

In this post you have learned how to provision site collection termsets and terms in office 365 using Powershell + CSOM.


› Provision Site Collection termsets and terms in office 365 using Powershell



Join 6,500 subscribers and receive instant access to

Devendra's Library of Resources for SharePoint Developers

About Author

Devendra Velegandla is a four-time recipient of Microsoft's Most Valuable Professional (MVP) award (2014-2017) for Office Servers and Services MVP and  SharePoint Server. He received the MCC award for his contributions in Microsoft MSDN/TechNet forums. He loves sharing articles, videos, and tutorial on SharePoint and Office 365.