I first I get a site/listitem and store it in variable $page.

$category = $page.FieldValues["myTermField"];

In above, I get the term-value in the field "myTermField" and store it in $category.

I then want to set the value of the $category variable to another field. I tried:

 Set-PnPListItem -List "SitePages" -Identity @myOtherPage -Values @{"myOtherTermField" = $($category);  }

Above does not work. I have tried to put the data in a text-column and it works - I get the term as Label|GUID. However, I want to put all in a managed metadata column and that does not work. I get the error "value cannot be empty".

I also tried:

 Set-PnPTaxonomyFieldValue -ListItem @myOtherPage  -InternalFieldName "myOtherTermField" -Terms @category

Above does not work. Get the error:

Set-PnPTaxonomyFieldValue : Cannot bind parameter 'TermId'. Cannot convert the "Microsoft.SharePoint.Client.Taxonomy.TaxonomyFieldValue" value of type "Microsoft.SharePoint.Clien t.Taxonomy.TaxonomyFieldValue" to type "SharePointPnP.PowerShell.Commands.Base.PipeBinds.GuidPipeBind".

Any help?

2 Answers 2


Try this:

$myOtherTermField = $category -as [Microsoft.SharePoint.Taxonomy.TaxonomyFieldValue];

I have answered the same question posted by you in another Technet Thread, please remember to check it:


You could try the following code, which works for me:

Set-PnPListItem -List "SitePages" -Identity 1 -Values @{"myOtherTermField" = $category.termguid}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.