Wiping Taxonomy Values Wiping Taxonomy Values
Meet Bhimani

Meet Bhimani

November 30, 2012

All Post
Wiping-Taxonomy-Values
Share:

Wiping MMS Taxonomy Values

Ever want to wipe out Taxonomy values in a Managed Metadata field in a library? Assigning a null won’t cut it. My good friend Brett Parker found the solution:

for ($i=0; $i -lt $count; $i++)
{
      $doc = $items[$i]
      $field = [Microsoft.SharePoint.Taxonomy.TaxonomyField]$lib.Fields[$CompanyMyGroup]
      $empty = New-Object Microsoft.SharePoint.Taxonomy.TaxonomyFieldValue($field)
      $field.SetFieldValue($doc, $empty)
      $doc.SystemUpdate()}

Leave a Reply

Your email address will not be published. Required fields are marked *

Want to talk?

Drop us a line. We are here to answer your questions 24*7.