-1

I would like to add remotely term sets in the managed metada service using C# or Powershell. How can I do it ?

Regards,

Arioule

0
   $GroupName="GroupName"
   $TermSet="TermSet"

   $taxonomySite =get-SPSite "SiteURL"
   $taxonomySession = Get-SPTaxonomySession -site $taxonomySite
   $termStore = $taxonomySession.TermStores["MMD Service Name"]
   write-host "Connection made with term store -"$termStore.Name

   $termGroup=$termStore.Groups[$GroupName]

   $termSet_AS = $group.CreateTermSet($TermSet)
   $termSet_AS.IsOpenForTermCreation = $true;
   $termStore.CommitAll()


   $trmSet = $termGroup.TermSets[$TermSet]
   $term = $trmSet.CreateTerm($termName, 1033) 
   $termStore.CommitAll()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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