question

RoyalDCosta-9872 avatar image
0 Votes"
RoyalDCosta-9872 asked RoyalDCosta-9872 commented

AD users migration cross forest

I am into a project of migrating AD users from one forest to another forest. we have two On premises AD forests with Azure AD sync and EOP mailboxes, I want to move some users from forest A to Forest B without affecting mailboxes/mailflow and then Change the UPN of moved users after the move is complete. can someone suggest me proper workaround to accomplish this task. v I tried following and failed .

Import-CSV -Path "c:\users.csv" | ForEach-Object {
$upn = $_.upn
(Get-ADUser -Filter {userprincipalname -eq $upn}).DistinguishedName | Move-ADObject -TargetPath "OU=test,DC=test,DC=com"

windows-active-directory
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

FanFan-MSFT avatar image
0 Votes"
FanFan-MSFT answered RoyalDCosta-9872 commented

Hi,

It is suggested to complete your goal step by step.
1, Migrate the users for Forest A to forest B
ADMT Guide: Migrating and Restructuring Active Directory Domains
https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-r2-and-2008/cc974332(v=ws.10)

2, Add the UPN suffix in forest B
You can do this through a GUI way or a PowerShell command
On the Active Directory Domains and Trusts window, right-click Active Directory Domains and Trusts, and then choose Properties.
On the UPN Suffixes tab, in the Alternative UPN Suffixes box, type your new UPN suffix, and then choose Add. Click OK when finished.

3, Change the UPN for all the uses or some of the users.
https://www.alitajran.com/change-users-upn-with-powershell/
This response contains a third-party link. We provide this link for easy reference. Microsoft cannot guarantee the validity of any information and content in this link.

It will be a better option to test in a lab for the important changes before doing in the production environment.

Best Regards,

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi,


Just want to confirm the current situations.
If there's anything you'd like to know, don't hesitate to ask.

Best Regards,

0 Votes 0 ·

Hi FanFan-MSFT

Thanks so much for your post. I could accomplish this with ADMT tool, you may mark it Answered.

0 Votes 0 ·