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.