How to Migrate Active Directory Server 2012 to 2022

Migrate Active Directory Server 2012 to 2022

This article will help you to migrate active directory server 2012 to 2022. If you wish to keep the same hardware and the server roles you have already set up without leveling the Windows server, you will have to do an in-place upgrade. In-place upgrades allow us to go from an older operating system to a new one while keeping your settings, server roles, & data thorough.

I am writing this article, to help Windows admin migrate an existing Active Directory which is working on Windows Server 2012 R2 name (DC2012) to Windows Server 2020 name (DC2022). So, let’s get started.

Please visit Microsoft Website for Upgrade Overview

This is a very straightforward procedure, but first, you need to test it in your Test Environment.

In my test lab, I have two Servers and my local domain Server is (xpertstec.local).

Virtual MachineOSRoleIP Address
DC20122012 R2Primary Domain Controller192.168.241.150
DC20222022Secondary Domain Controller192.168.241.160

Table of Contents:

Join Server 2022 to Active Directory

Install Additional Domain Controller

Log in with an additional domain controller (DC2022)

Change the alternative DNS server

Check the Master Operation role

Migrating FSMO roles to Windows Server 2022

Change Active Directory Domain Controller

Change Schema Master Role

Change Global Catalog

Raise Domain and Forest Function Level

Uninstall Active Directory from Windows Server 2012

Migrate Active Directory Server 2012 to 2022

Log in with an additional domain controller

Server login

Change the alternative DNS server

Open your network properties and then change the alternate DNS IP Address.

internet protocol version 4

Check the Master Operation role

Open PowerShell and then enter netdom query fsmo command to check the Master Operation role.

netdom query fsmo command

Migrating FSMO Roles to Windows Server 2022 (DC2022)

Launch active directory users and computers, Right-click on the local domain (xpertstec.local), and then select Operations Masters.

Change operations master role

Select the RID tab and then click Change.

Change operations master RID

Click yes

Transfer operations master role

Click ok

Operations master successfully transferred

Click on the PDC tab and then select Change.

Change operations master PDC

Click Yes

Transfer operations master role

Click OK

Operations master successfully transferred

Click on the Infrastructure tab and then select Change.

Change operations master infrastructures

Click Yes

Transfer operations master role?

Click OK

Operations master successfully transferred

Select close

Change operations master infrastructures

Change Active Directory Domain Controller

Still on the DC2012.xpertstec.local server, launch Active Directory Domain and Trusts, right click on Active Directory Domain and Trusts, and then select Change Active Directory Domain Controller.

Active directory domains and trusts

Change the Directory Server window, select This Domain Controller or AD LDS instance radio button and select your new Windows Server 2022 which is DC2022.xpertstec.local, and then select ok.

Change directory server

Right click on Active Directory Domains and Trusts and then click on Operations Manager.

Active directory domains and trusts

Click on the Change button to transfer the domain naming master role to the Windows Server 2022 (DC2022).

Domain naming operations master

Click Yes

Operations master successfully transferred

Click OK

Operations master successfully transferred

The Domain naming operations master is now transferred to DC2022.xpertstec.local.

Domain naming operations master

In the DC2022.xpertstec.local server, open PowerShell and then enter regsvr32 schmmgmt.dll to change the Schema Master. Click ok

Regsvr32 schmmgmt.dll PowerShell

In the next step, we will change Schema Master, type MMC, and then hit enter.

mmc PowerShell

Change Schema Master Role

Click on the File tab and then select Add/Remove Snap-in.

Console add/remove snap-ins

Add or Remove Snap-ins console, click on Active Directory Schema, click on Add button and then select ok.

Add or remove snap-ins

In the Console Root, right click on Active Directory Schema and then select Change Active Directory Domain Controller.

Console root change active directory

Click on DC2022.xpertstec.local server and then select ok.

Change directory server

Click ok to proceed

Active directory schema

Now again right click on Active Directory Schema and then select Operations Master.

Console root operation master

Choose the Change button to transfer the schema master role to Server 2022 (DC2022.xpertstec.local).

Migrate active directory change schema master

Click Yes

Migrate Active directory schema yes

Click ok to proceed

Operation master successfully transferred

Click Close

Migrate active directory change schema master

Run PowerShell, and then enter netdom query fsmo command. Now all the FSMO roles have been transferred to Active Directory Domain Controller Server 2022.

Netdom query fsmo PowerShell

Transfer FSMO Roles using PowerShell

Transfer the FSMO role to a different Domain Controller. Open PowerShell as admin rights

For Forest wide roles

Get-ADForest | choose schemamaster,domainnamingmaster

For Domain wide roles

Get-ADDomain | select ridmaster,pdcemulator,infrastructuremaster

Get-ADDomain command

Change Global Catalog

Launch Active Directory Sites and Services, expand Sites, expand Default-first-site, and then expand DC2022.

Right-click on NTDS Settings and then choose properties

Active directory sites and services

Deselect the Global Catalog box and then click ok.

NTDS system properties global catalog

Domain / Forest Functional Level

Right-click on the local domain and then choose rais domain functional level.

Active directory users and computers

Select the available domain functional level here and then click on raise button.

Raise domain functional level

Click ok

Raise domain functional level ok

Click ok

Raise domain functional level done

Raise forest functional level

Launch active directory domains and trusts

Right click on it and trust and then select raise forest functional level.

Active directory domains and trusts

Select raise

Raise forest functional level

Click ok

Raise forest functional level ok

Click ok

Raise forest functional level done

How to confirm the domain functional levels

Get-ADDomain | fl Name, DomainMode

How to confirm forest functional levels

Get-ADForest | fl Name, ForestMode

Get-addomain PowerShell

Now replace the DNS IP address.

Internet protocol version 4 properties

How to uninstall Active Directory from Windows Server 2012 R2

Log in to Server 2012 R2 with domain administrator credentials.

Run PowerShell and then enter the below command.

Uninstall-ADDSDomainController -DemoteOperationMasterRole –RemoveApplicationPartition

Remove domain controller PowerShell

Type local administrator credentials, confirm it and then press enter.

Demote domain controller PowerShell

Type Y and then press enter.

Uninstall domain controller PowerShell

Be patient. It will complete in few minutes.

Uninstalling domain controller PowerShell

The server will be restarted automatically.

you're about to be signed out

After restarting server 2012 R2 please join to workgroup.

Also, read this article: How to Upgrade Windows Server 2012 R2 to Server 2022

Comments

Leave a Reply