Termstore script

07/01/2012 11:49

1.Term store import with translation - adding to existing termset possibly
2.Term store export with translations
3.Term store access test - verifying all services, permissions for current account, people picker instalation...


$AdminName = $userName
$taxonomySession = Get-SPTaxonomySession -Site $siteUrl
$termStore = $taxonomySession.TermStores[0]

if($termStore -ne $null)

    # Removing all the existing TermStore Administrators
    foreach($admin in $termStore.TermStoreAdministrators)



     #Adding new term Store Administrator
    $group = $termStore.Groups["avd Group"]

    if($group -ne $null)

            #Updating Owner of all the term set.                   
            foreach($termSet in $group.TermSets)

                    $termSet.Owner = $AdminName;