PnP-PowerShell icon indicating copy to clipboard operation
PnP-PowerShell copied to clipboard

PNP Powershell - SystemUpdate doesn't work as expected

Open SahithiYamasani opened this issue 4 years ago • 1 comments

When am trying to update Document File Name (FileLeafRef) and try to preserve modified and editor values . It is creating New Version and Changing Previous Editor value in Version History.

Below is the code I have used to Update

Set-PnPListItem -List $ListName -Identity $item.Id -Values @{"FileLeafRef" = $FileLeafRef ;"Status"= $Status } -SystemUpdate #Creates first version Set-PnPListItem -List $ListName -Identity $Item.Id -Values @{"Modified"= $ModifiedOn;"Editor"= $UpdateUser.Email;} -SystemUpdate #doesnt work

Is there a way we can update these values without creating a new version. Kindly help.

Thanks!

SahithiYamasani avatar Sep 15 '20 13:09 SahithiYamasani

Hi @SahithiYamasani,

I'm seeing the same thing. It looks like you can set Author, but not Created, Modified or Editor.

I posted over HERE, but was directed to this GitHub repo.

Hopefully someone will notice our posts!

Thanks Craig

Update: I see there is an old thread about this HERE, which was never resolved.

Craig-Humphrey avatar Dec 02 '20 01:12 Craig-Humphrey