For one of my client, I had to migrate a SharePoint 2010 farm to a new domain. After reinstalling SharePoint from the beginning, I had to configure every service applications and migrate every content databases.
This post is the first of a series dedicated to migrated SharePoint from one domain to another.
The "problem" with the migrated database was that all user accounts and groups configured in SharePoint were from the old domain and not the new one. It was mandatory to migrate the old accounts to the new one (in the new domain). To do this task, I developped some PowerShell scripts. The script used to migrate users and group at the farm level is explained bellow. You can find this script here --> https://github.com/sschorgen/PowerShell/tree/master/SP10_Migrate-SPFromDomain
This script was written and executed on SharePoint 2010.
It is mandatory to create 2 CSV files :
- 1 used to make the correspondence between the groups of the old domain and the new one
- 1 used to make the correspondence between the usersof the old domain and the new one
You can find an example of the group CSV file below :
You can find an example of the user CSV file below :
One part of the script is used to migrate groups :
Another part of the script is used to migrate users :
Once you have created your 2 CSV files, you can execute this command :
Happy migration ;)