I am trying to move some publishing pages from an old SharePoint server to a new one using powershell. When I try to update the createdDate it says the property is read only. Is there a way to change createdDate and modified date for a publishing page using powershell?
If you have minor versioning enabled on the list, you can try to switch it of during the update.
$list.EnableMinorVersions = $false $list.Update() // Update items $aListItem["Created"] = yourNewDate $aListItem.UpdateOverwriteVersion() // When done, enable minor versions again $list.EnableMinorVersions = $true $list.Update()
Try to get list item(page) and update "Created" field:
$item["Created"] = Get-Date "5/1/2006 7:00 AM" $item.Update()
Another option might be to create your custom field and copy data to it.