0

I have a SharePoint 2010 site which contains a number of documents that are draft and have document approval turned on so that only approvers and the document author can see drafts. After copying the site using a sharepoint migration tool the document author can't see their document - as site owner I can see that the version history has been correctly copied and also that the author still appears in the 'created by' and 'modified by' fields. Apparently this is a limitation with the SharePoint migration APIs that the draft owner ID cannot be copied. Is there a way to assign a new author to the document so that they can see the draft after migration?

0

If you want to update the Author for the documents than you can use the PowerShell command mentioned below.

[Reflection.Assembly]::Load(“Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c”)

$SPSite = New-Object Microsoft.SharePoint.SPSite(http://yoursitename/site1/site2/)

$SPWeb = $SPSite.OpenWeb()

$SPList = $SPWeb.Lists[“Your List”]

$SPListItemCollection = $SPList.Items

foreach ($ListItem in $SPListItemCollection)

{

$SPFieldUserValue=New-Object Microsoft.SharePoint.SPFieldUserValue ($SPWeb,10, “domainname\username”)

$ListItem[“Author”] = $SPFieldUserValue
$ListItem.Update()

}

$SPWeb.Update()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.