How to Replace Created by and Modified by user in SharePoint List using powershell

Here is the quick script to replace the created  by and modified by column in SharePoint List. These cannot be directly modified using front end.

$replacedUser =$web.EnsureUser("domain\user")
$list=$web.Lists["Shared Documents"] //replace your List name
foreach($item in $list.Items)       
   $item["Author"] = $replacedUser   
   $item["Editor"] = $replacedUser   

Leave a Reply

Your email address will not be published. Required fields are marked *