PnP-PowerShell
PnP-PowerShell copied to clipboard
PNP Powershell - SystemUpdate doesn't work as expected
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!
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.