Forum Discussion

alwaysLearner's avatar
alwaysLearner
Iron Contributor
Mar 29, 2019

update managed metadata with PowerSell

I need to update managed metadata column in a Document Library, SharePoint Online. I have following: 

-TermGroup CompanyName

-TermSet GeographicScope

-Term "Europe and Central Asia"

 

I am doing this:

 

Set-PnPListItem -list Programmes -Identity 1613 -Values @{"GeographicScope" = "GeographicScope|Europe and Central Asia|Turkey-TUR"}
 
this runs ok, however, the columns stays unchanged. 
Appreciate any help. Why the column is not updating?
 

2 Replies

  • alwaysLearner Is your column name GeographicScope?

    Also I think the syntax for  the values is "Group|TermSet|Term1|Term2". 

    So maybe Values @{"GeographicScope" ="CompanyName|GeographicScope|Europe and Central Asia|Turkey-TUR"}

    • alwaysLearner's avatar
      alwaysLearner
      Iron Contributor

      Beau Cameron 

       

      Yes, column name is GeographicScope (without spaces, that is what I see on the library)

      If I add CompanyName|GeographicScope|Region|Country then I get following error:

       

      Set-PnPListItem : Value cannot be null.
      Parameter name: taxValueCollection

Resources