update managed metadata with PowerSell

%3CLINGO-SUB%20id%3D%22lingo-sub-390952%22%20slang%3D%22en-US%22%3Eupdate%20managed%20metadata%20with%20PowerSell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-390952%22%20slang%3D%22en-US%22%3E%3CP%3EI%20need%20to%20update%20managed%20metadata%20column%20in%20a%20Document%20Library%2C%20SharePoint%20Online.%20I%20have%20following%3A%26nbsp%3B%3C%2FP%3E%3CP%3E-TermGroup%20CompanyName%3C%2FP%3E%3CP%3E-TermSet%20GeographicScope%3C%2FP%3E%3CP%3E-Term%20%22Europe%20and%20Central%20Asia%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20doing%20this%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CDIV%3E%3CDIV%3E%3CSPAN%3ESet-PnPListItem%3C%2FSPAN%3E%20%3CSPAN%3E-%3C%2FSPAN%3E%3CSPAN%3Elist%20Programmes%20%3C%2FSPAN%3E%3CSPAN%3E-%3C%2FSPAN%3E%3CSPAN%3EIdentity%20%3C%2FSPAN%3E%3CSPAN%3E1613%3C%2FSPAN%3E%20%3CSPAN%3E-%3C%2FSPAN%3E%3CSPAN%3EValues%20%3C%2FSPAN%3E%3CSPAN%3E%40%3C%2FSPAN%3E%3CSPAN%3E%7B%3C%2FSPAN%3E%3CSPAN%3E%22GeographicScope%22%3C%2FSPAN%3E%20%3CSPAN%3E%3D%3C%2FSPAN%3E%20%3CSPAN%3E%22GeographicScope%7CEurope%20and%20Central%20Asia%7CTurkey-TUR%22%3C%2FSPAN%3E%3CSPAN%3E%7D%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Ethis%20runs%20ok%2C%20however%2C%20the%20columns%20stays%20unchanged.%26nbsp%3B%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3EAppreciate%20any%20help.%20Why%20the%20column%20is%20not%20updating%3F%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%26nbsp%3B%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-390952%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPnP%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-391183%22%20slang%3D%22en-US%22%3ERe%3A%20update%20managed%20metadata%20with%20PowerSell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-391183%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F39836%22%20target%3D%22_blank%22%3E%40Beau%20Cameron%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYes%2C%20column%20name%20is%20GeographicScope%20(without%20spaces%2C%20that%20is%20what%20I%20see%20on%20the%20library)%3C%2FP%3E%3CP%3EIf%20I%20add%20CompanyName%7CGeographicScope%7CRegion%7CCountry%20then%20I%20get%20following%20error%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESet-PnPListItem%20%3A%20Value%20cannot%20be%20null.%3CBR%20%2F%3EParameter%20name%3A%20taxValueCollection%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-390986%22%20slang%3D%22en-US%22%3ERe%3A%20update%20managed%20metadata%20with%20PowerSell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-390986%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F33597%22%20target%3D%22_blank%22%3E%40jahongir%20abdurahmonov%3C%2FA%3E%26nbsp%3BIs%20your%20column%20name%26nbsp%3B%3CSPAN%3EGeographicScope%3F%3CBR%20%2F%3E%3CBR%20%2F%3EAlso%20I%20think%20the%20syntax%20for%26nbsp%3B%20the%20values%20is%20%22Group%7CTermSet%7CTerm1%7CTerm2%22.%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3ESo%20maybe%20Values%26nbsp%3B%40%7B%22GeographicScope%22%26nbsp%3B%3D%22CompanyName%7CGeographicScope%7CEurope%20and%20Central%20Asia%7CTurkey-TUR%22%7D%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Contributor

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
Highlighted

@jahongir abdurahmonov 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"}

@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