문제

I have two managed metadata service applications in the Farm. I want to copy all the groups, term sets and terms with existing GUIDs from one MMS term store to another MMS term store using PowerShell. Is it possible?

도움이 되었습니까?

해결책

Install term set export/import tool WSP from here.

Then use the following PowerShell to export and import Term Groups one by one including all content.

$ver = $host | select version
if ($ver.Version.Major -gt 1) {$host.Runspace.ThreadOptions = "ReuseThread"} 
if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) {
    Add-PSSnapin "Microsoft.SharePoint.PowerShell"
}

Export-SPTerms -Group (Get-SPTaxonomySession -Site "https://siteconnectedtosourcemms.com").TermStores[0].Groups["TermGroupName"] -OutputFile "c:\temp\terms.xml"

Import-SPTerms -ParentTermStore (Get-SPTaxonomySession -Site "https://siteconnectedtodestinationmms.com").TermStores[0] -InputFile "c:\temp\terms.xml"

다른 팁

What could be the solution for error you mentioned above

"Failed to read from or write to database. Refresh and try again. If the problem persists, please contact the administrator"

I am using different script but during the test I deleted terms few times and not getting this error. I want to import terms with the same IDs, how can I get rid of these IDs in the database or in other words clean up MMS database ? Any idea ? Thanks in advance. @Jussi

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top