SharePoint 2010 Managed Metadata

If you’re like a lot of other folks, you’ve taken advantage of the Managed Metadata functionality in SharePoint.  You’ve created your taxonomy group, specified your term sets, and created some terms.  Then you’ve created your managed metadata column in your site collection, and pointed it to your specified term set.  You’ve then uploaded a lot of documents and specified terms for the metadata column, everyone is “happy happy happy”. 

But then you need to rename one of your terms currently called “Information Technology Department” to just “Information Technology”.  No sweat, you go into the Term Store tool, rename the term.  Done right?  To your surprise, when you look at properties of various documents tagged with your term, they haven’t been renamed.  Hmm … what gives?

At this point, the change hasn’t propagated from the term store to the hidden sync lists in the site collection.  This is controlled by the timer job “Taxonomy Update Scheduler” (I know right, something is named as to what it does).  So we could either wait for an hour for it to run, or we could go to Central Admin and run it manually.  Under normal circumstances, this would be enough, and our metadata content would be updated.  You can find this outlined in another post with screenshots.

In my scenario, I ran the timer job, and the term still wasn’t updated on the content.  After some searching, this appears to be a known bug with SharePoint.  While the symptoms are slightly different, we are seeing the same end behavior.  They provide a PowerShell script that runs some C# code that will correct the issue. This is fine, but while searching somewhere on the TechNet Forums someone provided a simpler version that’s pure PowerShell (no C# code):

Add-PSSnapin microsoft.sharepoint.powershell -erroraction silentlycontinue
			
$site=Get-SPSite "http://portal"
[Microsoft.SharePoint.Taxonomy.TaxonomySession]::SyncHiddenList($site)
$site.dispose()

This worked for me, so I hope it helps out someone else!  Again, I didn’t write this but I couldn’t find the original poster for credit.  On a side note, if you need to update a metadata column with PowerShell, be sure to check out the recent article by my colleague Kyle Wright. 

You can also find a very detailed write-up of how metadata functionality works in SharePoint by MVP Andrew Connell