I would like to use PnP PowerShell to make a change to multiple SharePoint Online News Post pages. I can successfully make the change and then publish the page again using $pageName.File.Publish(), and then Invoke-PnPQuery. However this updates the modified by property to who executes the script, which I don’t want as I would like to retain the original modifier.
I can use Set-PnPListItem to set the modified by field back to the original modifier, but then the page is then in draft status again. Obviously publishing then updates the modified by field again.
So is there anyway to either:
- Publish a page without updating the modified by field? e.g. a SystemUpdate OR
- Update the page properties without the need to re-publish the page