How to change the value of a column in Site Pages in Sharepoint

Hello

I would like to add a value to the property ‘SME’ to my pages in my Sharepoint site. I added an image to clarify my question.

Does anyone know how to do this with PowerShell?

Thank you in advance!

Louis

See my answer to your earlier post:

Hi,
Sorry, of course I understand.
Attached you can find my code (between the red lines is my attempt to assign property ‘SME’ to the page, but I receive the following error code:
Line |
41 | Set-PnPListItem -List “Sitepagina’s” -Identity $pageListItem.Id -Valu …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| No -Identity has been provided specifying the item to update

Am I on the good way? Do you know what I do wrong?

pictures are nice, but this is a Powershell forum, which means it’s all about the code. If you provide your actual Powershell code (from the right side of your picture) it would be easier for us to review. Remember to use the “Preformatted text” button to format your Powershell as code so it’s readable on here.

But, the error message seems to tell the story here: there’s no identity being provided to the cmdlet.
Have you tried stepping through your code line by line in an IDE (Powershell ISE/VS Code)? Make sure that your variable actually contains the value you’re expecting when you call $pagelistitem.Id

1 Like