PnP issue on SPO DocumentSet

Copper Contributor


I am struggeling with an PnP issue on Documents Sets. I need to update the property values on the Document Set shared properties as well as properties in documents (with different content types) inside the Document Set


I tried somthing like this:


$docs = Get-PnPListItem -web $subsiteurl -List $TargetListID

foreach ($item in $docs){

$spfile = Set-PnPListItem -List $TargetListID -Identity $item.Id -Values @{"xx"="$xx"} 
$spfile = Set-PnPListItem -List $TargetListID -Identity $item.Id -Values @{"yy"="$yy"} 


I do get the List/ibrary items including the Document Set folder, but it is NOT able to Set-PnPListItem values, I get no errors when running the powershell


I did this on SP2013 on-premise with no problem like this:


$weburl = $_['TargetSiteURL']
$web = Get-SPWeb -Identity $weburl
$list =$web.lists["TagetlistName"]

foreach($item in $list.folders) 



Please Post if you have a hint to a solution...


Anyone with input :) ?? much appreciated


/ MBNielsen


1 Reply
I'm doing something similar with Document Sets and custom content type and I've been successful updating properties with this:

$newDS = Add-PnPDocumentSet -List FixedAssetDocs -ContentType FixedAssetDocSet -Name "$dsTitle"
$addedDS = $web.GetFolder($newDS)

This works fine with the exception of the "DateAcquired" field and another text field. I've verified internal field names and all of that and still can't get those two fields to update.