I have a list in SharePoint 2013 that I'm importing items from a csv. I need to change the created date to the created date of the imported item. I'm able to import the list item successfully but I cannot change the created date with PowerShell. I have tried on another list and it works correctly. Has anyone experienced this behavior before or know what the cause is?
Here's my code to update field
$web = Get-SPWeb "<Web Url>" $web.AllowUnsafeUpdates = $true $List = $web.GetList("<List Url>") $item = $List.GetItemById(11) $dateToStore = Get-Date "6/20/2015 11:27 AM" $item["Created"] = $dateToStore $item.Update() $web.AllowUnsafeUpdates = $true $web.Dispose()
Note, I have tried all different date formats and Update methods. There aren't any errors when running this script. The Created date is just not updated on the list item.