Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am trying to copy a list from one web app to another web application .All the list items are copying fine except for Contact Details (which is column of type person).This column is showing empty . Can anyone suggest me how to make this work

Thanks

share|improve this question
add comment

1 Answer

You may have to use EnsureUser and pass AccountID for target list item.

For example,

[Microsoft.SharePoint.SPUser]$spuser = $spWeb.EnsureUser("domain\username")
$spListItem[$newSMTName] = $spuser
$spListItem.Update()

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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