Skip to main content

Posts

Showing posts with the label Document Library

Change "Created By' field in SharePoint Library

I got an requirement to change the created by to different user after a user left the firm.  I tried an approach with Powershell but I found it easy to update in content database.  Change the "Created by" field through the SQL content database(Tables dbo.alldocs and dbo.alluserdata). In dbo.alluserdata change tp_author to the new sharepoint ID, and any of the nvarchar names referencing the old account name. In dbo.alluserdata and dbo.alldocs change just tp_draftownerid.  Through PowerShell and credit goes  here   # Get the SharePoint Assembly # You will need to run this on the SharePoint Server [Reflection.Assembly]::Load("Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c") # The site my list was in was at  http://dev # create a new object called $SPSite $SPSite = New-Object Microsoft.SharePoint.SPSite(" http://dev/") # Make sure you have the last “/” in the url on the site # allow $SPWeb to be the OpenWeb from the si...