Update Created, Created by, Modified & Modified fields using SharePoint Online Powershell

You have noticed that when you are migrating content in a SharePoint Document library or list using a migration tool and gives you the option to keep the timestamp and user details for created and modified fields. But if you manually copy few the fields than it would be showing up with you name and recent date.

Using SharePoint Online PowerShell

You can use SharePoint Online or PnP PowerShell cmdlets to update the date and user details for Create and modify fields for a SharePoint list item or document. I have written a PowerShell function UpdateTimestamp which will take site url, list name and create & modified parameter details from the user.

Using Pnp PowerShell

You can also achieve the same task by a simple PnP PowerShell cmdlet as listed below:

I would not recommend you to update these values if there is no need, it will only be required if you need to maintain the original details of the list item. You can also iterate the above script if there are more list items with a little modification.

The following two tabs change content below.
Adnan Amin
Adnan is two time SharePoint MVP (Most Valuable Professional) with over 12 years of extensive experience with major expertise on SharePoint Server, Office 365, .Net Platform and Microsoft BI. He is currently working SharePoint Architect at FMT Consultants. He is MCT Regional Lead for Pakistan Chapter since 2012. He is working on SharePoint for past nine years and worked on different intranet/intranet solutions for private & govt. sector majorly in Gulf region, which include OOB and customized solutions. He is a trainer, technology evangelist and also speaks in community forums.

Leave a Reply