I have a sharepoint 2013 foundation server on solution 1 which is being replaced. The sharepoint DB is around 12Gb in size.

I need to ship this db to a new sharepoint server in a new domain on solution 2. I understand I will need to reset permissions as the user SID's will change, but can someone point me in the right direction for migrating?

I have searched quite a bit for this and cant see to find any relevant instructions that make sense.

1 Answer 1


You will have to run a STSADM script to move users from the OLD-AD to the NEW-AD, like this:

STSADM –o migrateuser –oldlogin OLDDOMAIN\user1 –newlogin
    NEWDOMAIN\user1 –ignoresidhistory

This will do just fine on SharePoint Foundation. But if you have a User Profile Service Application, you may run into trouble. My experience tells me it doesn't work that well, and you need to clean up the user profiles that doesn't get imported correctly several times by running the following PowerShell script:

# Clean up accounts that is not imported correctly

$upsa = Get-SPServiceApplication | Where-Object {$_.TypeName -like
    "User Profile Service Application"}

# List all user accounts that is not imported correctly
Set-SPProfileServiceApplication $upsa -GetNonImportedObjects $true

# Remove user accounts not imported correctly 
# Uncomment line below to run
Set-SPProfileServiceApplication $upsa -PurgeNonImportedObjects $true

# Run a full User Profile Service Syncronisation, and make sure users
# end up in Profile database.
# If not, users who log in will create new NonImportedObject accounts

This won't remove users activity on content (as author and editor), nor will it delete content added by the user. It simply frees the old profile from the User Profiles DB making it possible for the new profile to take ownership.

More to read (from my own blog): SharePoint 2010: Migrate Users to new Active Directory Environment

  • 1
    As John mentioned, he is on SharePoint Foundation. So he won't need the UserProfileService part of your solution. STSADM should work fine.
    – MHeld
    Commented Jan 3, 2017 at 7:58
  • @MHeld True that! Thanks for clarifying my answer (I'll update).
    – Benny Skogberg
    Commented Jan 3, 2017 at 8:01
  • does this still apply if the users are already re-created on the new solution? I've already migrated exchange and everything else, so the users are already in place. I understand that the new users will have different SIDs... Is there a method by which I can re-map the old users to the new users or something? Also, what about the data itself?
    – John
    Commented Jan 3, 2017 at 8:21
  • @John Since you're using migrateuser STSADM it won't change already migrated users, only map the OLD domain to the NEW domain. And it's true that the new user needs to exist in the new environment before running the script. But as always, you should test in a test environment first making sure everything works as expected before running any script in production.
    – Benny Skogberg
    Commented Jan 3, 2017 at 8:25
  • ok, thanks. that makes sense. But what about the actual data within sharepoint? Can i use the backup and restore tools within sharepoint then use the above commands to sort permissions?
    – John
    Commented Jan 3, 2017 at 13:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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