2

From SharePoint 2007 to SharePoint 2010, I have partially migrated some of our sites. However, since due to the immediateness of the requirement, sites which has issues was left behind the old SharePoint.

Now I am faced migrating a site which has 'People' fields. My problem is whenever I do Export/Import-SPWeb, the 'People' loses value - this is due to the fact that the UserInfo table is incomplete, not all users have logged in to the new site collection.

Is it possible to prepopulate the UserInfo table with what is in the User Profile? Please advise.

1

in SharePoint 2010, once user profile is setup run the Full Syncronization which should automatically try pushing updates to User Information lists across sites.

It is possible to use still the old stsadm -sync command to refresh old content databases. Gary Lapointe shared a script (http://blog.falchionconsulting.com/index.php/2011/12/updating-sharepoint-2010-user-information/) which should help you force a sync (for this user across all site collections), see below

function Sync-SPUser([string]$userName) {
  Get-SPSite -Limit All | foreach {
    $web = $_.RootWeb
    if ($_.WebApplication.UseClaimsAuthentication) {
      $claim = New-SPClaimsPrincipal $userName -IdentityType WindowsSamAccountName
      $user = $web | Get-SPUser -Identity $claim -ErrorAction SilentlyContinue
    } else {
      $user = $web | Get-SPUser -Identity $userName -ErrorAction SilentlyContinue
    }
    if ($user -ne $null) {
      $web | Set-SPUser -Identity $user -SyncFromAD
    }
    $web.Dispose()
    $_.Dispose()
  }
}

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.