Forum Discussion

Nigel_Price9911's avatar
Nigel_Price9911
Iron Contributor
Jul 27, 2017

Add-PnPFile adding column value where column name contains a spoace

Hi

 

I am trying to add a file to a library using Add-PnPFile.

 

One of the columns in the content type of the file is called Business Unit and its a Taxonomy column.

 

So I used in the Add-PnPFile :-  -Values @{Business_x0020_Unit=$businessUnit} 

Where $businessUnit is "Navigation|Root|Term1|Term1a|Term1a1"


I get the error message - Add-PnPFile : The given guid does not exist in the term store

 

Anybody any Ideas ?

 

Regards

Nigel

 

 

4 Replies

  • Hi,

    You need to use Guid value of terms and you can find the guid value from site setting -->site administration -->term srore management --> terms set-->terms -->Unique Identifier 

     

     

    Example: 

    add-pnpfile  -path C:\test.csv -values @{jobname="33e7276f-f7ae-4629-9a72-9b5a4b573f38"}

     

    • Nigel_Price9911's avatar
      Nigel_Price9911
      Iron Contributor

      Hi Manidurai Mohanamariappan

       

      The documentation says you can do this :-

       

      Managed Metadata (single value with path to term): -Values @{"MetadataField" = "CORPORATE|DEPARTMENTS|FINANCE"}

       

      I have added this to the PnP PowerShell list of issues.

       

      Regards

       

      Nigel

Resources