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()} |
Want to talk?
Drop us a line. We are here to answer your questions 24*7.