There is currently a domain migration happening within our organisation. The users accounts are being migrated from a sub-domain to top level domain.

As part of this we have two SharePoint Farms - but our main SharePoint environment resides in the top level domain.

How can I migrate the users profiles in both SharePoint environments so that they will all work with same permissions/groups/etc. in the main SharePoint Farm in our top level domain.

My preference is to script this using Powershell if possible.

3 Answers 3


Take a look a Move-SPUser to see if that works for you.

Here is the example from TechNet

Move-SPUser -Identity "DomainA\JaneDoe" -NewAlias "DomainB\JaneDoe"

Just be careful of your service accounts when scripting it.

  • Should this be run only on the SharePoint servers in the destination domain? Sep 11, 2015 at 8:03
  • You run it against the web application in the destination domain after you move it over. You could run it at source but probably users would lose access at that time.
    – Lance
    Sep 11, 2015 at 13:50

Just to add - You can use

$farm.MigrateGroup($.oldlogin, $.newlogin)

to migrate AD groups. Here are references to few PowerShell scripts to automate your migration process. You can use an input CSV file to do the migration.

Good luck - hope this helps!


you can use the STSADM command for that:

STSADM.EXE -o migrateuser -oldlogin “i:0#.w|SourceDomain\OldUser151” -newlogin “i:0#.w|TargetDomain\NewUser151” -ignoresidhistory

The following article describes the SharePoint user migration process in more detail.


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.