Tell me more ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have created a custom Managed metadata service by using Powershel script. Everything works ok, and I can add Taxonomy Fields to ContentTypes and change the values of them on "Edit Properties" page för every document within Document libraries. the problem is when I recreate this MMS by runing the script again, the fields are being read only when I go to Edit properteis. So I created another script to update lists to use the new TermSets and SSPID. It works ok as well but everytime I create new Library I need to run the script for this library as well. My question is, is there any way to update TermSets on Site Collection or Site level? Thanks. I have already tested UpdateUsedTermsOnSite and ResyncHiddenList no success

share|improve this question
I found the answer, here is the PowerShell script: $fs= $rootWeb.Fields for($i = 0; $i -lt $fs.Count; $i++) { $f = $fs[$i] if($f.StaticName -eq "MyField") { $s= Get-SPTaxonomySession -Site $Site $ts= $s.TermStores["MyService"] $tSet= $ts.Groups["myGroup"].Termsets[$f.StaticName] $rootWeb.Fields[$f.id].TermSetId = $myTermSet.Id $rootWeb.Fields[$f.Id].SspId = $termStore.Id $rootWeb.Fields[$f.Id].Update($true) } } – Medes May 29 '12 at 13:38

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.