0

I am trying to import the Author(from a csv file) to the Author/Created By column in a SharePoint list. Running the code I have, the Created By/Modified column automatically retrieves the server login. I am doing this with CSOM. I tried using LookUpValue at the end, with no luck. Any suggestions?

$newItem["Author"] = $row."Author";
Matt
  • 45,022
  • 8
  • 78
  • 119
  • Are you stuck using CSOM, or would it be feasible for you to run Powershell from one of the web front end servers? Locked properties like Created and Modified By cannot typically be edited, but they can be edited via a server-side call to [`SPItem.SystemUpdate`](https://msdn.microsoft.com/EN-US/library/office/ms461526.aspxhttps://msdn.microsoft.com/EN-US/library/office/ms461526.aspx). – Thriggle Nov 25 '15 at 14:23
  • I am stuck using CSOM because I am exporting and importing across different farms. – Sharepoint Rocks Nov 25 '15 at 14:47
  • Just a thought: if you can execute your script from a server on the destination farm, you could use CSOM to access the old farm (building the CSV representation of an exported list) and then use the server object model to translate the CSV into a list on the new farm, giving you access to overwrite fields like Created/Modified and Created By/Modified By. – Thriggle Nov 25 '15 at 15:29

0 Answers0