To update the Created Field for SharePoint list item you can start the script like this. The most important here is the ‘fullcontrol’ permissions and ‘-UpdateType UpdateOverwriteVersion’ parameter in the request.
$url = 'https://markimarta.sharepoint.com/sites/dev'
Connect-PnPOnline -Url $url
$itemId = 57
$created = Get-Date "2025-03-14 00:00:00Z" # 1 Apr current year, UTC
$listTitle = 'MegaRequests'
Set-PnPListItem -List $listTitle -Identity $itemId -Values @{ "Created" = $created } -UpdateType UpdateOverwriteVersion
When you need it? I used it for integration tests on the data a-la production, but also you may need it for developer tests and requests.
Leave a Reply