How to iterate through all Groups, TermSets, Terms and all Sub Terms
-
02-10-2020 - |
Domanda
I want to copy the exact hierarchy (as seen below) of Groups, termsets and all level of terms from one MMS to another MMS:
I am looking for sample server side API code to perform this from where i can get an idea?
I have used following command to export whole the termstore:
Export-SPTerms -TermStore (Get-SPTaxonomySession -Site $sourceMMSWebApp).TermStores[0] -OutputFile "c:\temp\termStore.xml"
now, i want to import all the groups to destination MMS, which command should i use?
Soluzione
You can use Script Created by http://blog.falchionconsulting.com/index.php/downloads/
There is a cmdlet that allows to export terms into an XML file and another cmdlet that allows importing from xml file.
http://www.falchionconsulting.com/PowerShellViewer/Default.aspx?Version=SP2010&Cmdlet=Export-SPTerms
http://www.falchionconsulting.com/PowerShellViewer/Default.aspx?Version=SP2010&Cmdlet=Import-SPTerms