Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two-decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. He has held various positions including SharePoint Architect, Administrator, Developer and consultant, has helped many organizations to implement and optimize SharePoint solutions. Known for his deep technical expertise, He's passionate about sharing the knowledge and insights to help others, through the real-world articles!

7 thoughts on “How to Add Managed Metadata Column to SharePoint List using PowerShell?

  • great script, small change:

    $TaxonomyField = $List.Fields.CreateNewField(“TaxonomyFieldType”, $TermSet.Name)

    should be:

    $TaxonomyField = $List.Fields.CreateNewField(“TaxonomyFieldType”, $FieldName)

    otherwise the name of the field is always equal to the name of the termset and the parameter stays unused.

    Reply
  • I am good all the way do the “Regions” termset, I have one more child term set inside that, how do I call it?

    Reply
    • The logic is TermStores.Groups.TermSets.Terms.Terms.Terms…
      So after the TermSets there are “nested” Terms.

      $TermStore = $TaxonomySession.TermStores[“Managed Metadata Service”]
      $TermGroup = $TermStore.Groups[“Knowledge Portal”]
      $TermSet = $TermGroup.TermSets[“Regions”]
      $Terms = $TermSet.Terms[“Terms”]
      $Terms1 = $Terms.Terms[“Terms1”]
      $Terms2 = $Terms1.Terms[“Terms2”] and so on…

      Reply
  • Hello Salaudeen,

    Thank You for the excellent script. I have a question. I wanted this script to add a managed metadata column to all the document libraries in a site collection. Do you know if that is possible and what can be the script changes to accomplish it?

    Thanks,
    Ricky

    Reply
  • thanks sir 😉

    Reply
  • Hello please, how can i define this column to be multivalue ? using powershell !

    Reply

Leave a Reply

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