We have a DEV environment with Managed metadata "Term Group" for our project e.g. TermGroupA. Another project uses a managed metadata "Term Group" e.g. TermGroupB on UAT environment.

We need to deploy our TermGroupA to UAT, we are planning to use Export-SPMetadataWebServicePartitionData and Import-SPMetadataWebServicePartitionData PowerShell script to do this (Note: We need to preserve the GUID, as these are attached to navigation)

Question: If we do Export and Import onto UAT - will this overwrite TermGroupB? or will this append our TermGroupA into existing Managed metadata database?

If it is going to overwrite and affect TermGroupB, is there any other portable option to move a "term group" across environments preserving the GUID?

No csv, as they don't preserve GUID and no third party tool please. Anything using PowerShell great. Thanks Guys!

3 Answers 3


Thanks Waqas. I used PowerShell to export my "term sets" within my TermGroupA as a XML file. This XML will preserve all GUID's for "term sets" and "terms" NOTE: As far as I know it doesn't extract the "term group" GUID (which was fine for me).

Grab that XML file, take it to UAT application server and again use PowerShell to create these "term sets" and "terms" on UAT using the XML file with exact GUID as in DEV server. The contents in the XML are loaded as PowerShell objects and we can use Microsoft.SharePoint.Taxonomy class to create them.

This blog gave me the idea and fundamental script to achieve my solution. To Export: http://sharepap.blogspot.co.uk/2013/01/exporting-and-importing-managed.html - to Import http://sharepap.blogspot.co.uk/2013/01/importing-managed-metadata-termset-from.html

The scripts needed some tweaking to make it work, but will be good starting point.


the metadata GUID can be replicated and imported from/to Service Application by Microsoft.SharePoint.Taxonomy class. That mean implement the custom export/import process by either using .Net code or Powershell.

In this blog post I want to show you how to use the C# code with Taxonomy APIs to export and import managed metadata. At the same time I make a assumption you are experienced .Net development and with appropriate SharePoint knowledge.

Migrate SharePoint 2010 Managed Metadata to another farm or Service Application.

code is too long, so i am unable to paste here. Please check the Blogs for import & export.


Here is a recursive version of the code posted by @S.Subash https://gist.github.com/anonymous/8968bb5c08d2210c2873

  • 1
    While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. Commented Dec 2, 2015 at 5:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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