Forum Discussion

PHubaut's avatar
PHubaut
Copper Contributor
Feb 17, 2021
Solved

Set-PnPListItem - Multiple Managed Metadata Field

I need to update a Multivalued Managed Metadata field in a document library (sometimes resetting value as well), I'd like to use Set-PnPListItem to do this. Assuming $LibraryName and $Id are respect...
  • Joel Rodrigues's avatar
    Feb 17, 2021

    PHubaut did not try it, nor am I a super-efficient PowerShell developer, but could you try to:

    -create a main array that will contain all your items

    -for each object, add to the array. Not sure of you need to create an array with @(yourVal) inside the foreach for the object and append to the main array like: $mainArray  = $mainArray + $itemArray? 

     

    Sorry of this does not help

     

Resources