Create Taxonomy Group TermSet and Term in SharePoint 2010 using powershell


In this article we will be seeing about how to create a new term, termset and group in SharePoint 2010 using powershell.

In this article we will be seeing the following:

  • Create a new group for the term store
  • Create a new termset for the group
  • Create a new term for the termset

Create a new group for the term store:

$taxonomySession=Get-SPTaxonomySession -Site "http://servername:10/"
$termStore=$taxonomySession.TermStores["MMS"]
$group=$termStore.CreateGroup("SharePoint Group")
$termStore.CommitAll()

taxonomy1.gif

Create a new termset for the group:

$taxonomySession=Get-SPTaxonomySession -Site "http://servername:10/"
$termStore=$taxonomySession.TermStores["MMS"]
$group=$termStore.Groups["SharePoint Group"]
$termSet=$group.CreateTermSet("Word Automation Term Set")
$termStore.CommitAll()

taxonomy2.gif

Create a new term for the termset:

$taxonomySession=Get-SPTaxonomySession -Site "http://servername:10/"
$termStore=$taxonomySession.TermStores["MMS"]
$group=$termStore.Groups["SharePoint Group"]
$termSet=$group.TermSets["Word Automation Term Set"]
$term1=$termSet.CreateTerm("Conversion",1033)
$termStore.CommitAll()

taxonomy3.gif