Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Is there a way to overwrite the existing term set or will I only be able to add new terms to it manually? I have a csv file I used to import a term set. I recently added terms to that csv file and now want to update the term set with those new terms. However, when I upload the term set again, it doesn't overwrite the existing one, but rather creates a new one with a '1' appended to the name. Removing the old term set and adding the updated one with the same name does not work.

share|improve this question
add comment

2 Answers

you could use something like this

$spapp = Get-SPServiceApplication -Name "Managed Metadata Service"
$spguid = $spapp.id
$security = Get-SPServiceApplicationSecurity $spguid -Admin
Grant-SPObjectSecurity $security -Principal "Domain\username" -Rights "Full Control"
Set-SPServiceApplicationSecurity $spapp $security –Admin(Get-SPServiceApplicationSecurity $spapp -Admin).AccessRules

Another suggestion is sign DEPRECATED the old terms

share|improve this answer
    
Is there anything that can be done on the site itself? I don't believe we would have the access to do this without submitting a ticket to our help desk to have them do it for us. –  user16457 Apr 18 '13 at 17:57
1  
oh yes. You need to know what's the name of your MMD service and you need the permission to do this operation. BTW I don't think you need anything else. –  Salvatore Di Fazio Apr 19 '13 at 7:33
    
To make sure I understand, something like the code you supplied would need to be applied (where?) and then we'd be able to overwrite the term set whenever needed with the updated one? –  user16457 Apr 19 '13 at 14:04
add comment

The Managed Metadata Service, which houses the term store (Groups, TermSets, Terms), is a farm-wide service. Any PowerShell scripts or .Net SharePoint API code that modifies any of these must be executed on one of the servers in the farm, whether it's a Console Application, Windows Form, Webpart, Application (ASPX) page, etc.

Overwriting (i.e. deleting and recreating) a TermSet can be a dangerous operation: the Guids behind the terms that actually associate site columns to Terms/TermSets will be destroyed, causing any existing site columns that are bound to the TermSet or any Terms therein to become dissociated. Bad news.

Although it is possible to preserve these Guids by various means, the code to do so isn't trivial, and I strongly suspect there's a better solution to your root problem.

If you've read this far, can I ask why you need to change the TermSet's Terms so drastically that you need to overwrite the entire TermSet?

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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