How to Migrate Active Directory from Windows Server 2012 R2 to 2019

Published Jul 30 2019 06:20 AM 109K Views
Senior Member

Windows Server 2019 was available for public (GA) from early October 2018. In past I have written many articles about domain migrations by covering different Active Directory versions. So, it is time me to write about AD 2019 migrations. In this demo I am going to demonstrate how to migrate from Active Directory 2012 R2 to Active Directory 2019. The same procedure is going to apply for any AD version from Windows Server 2008.  


Migration itself is very straight forward task, however, there are other things you need to consider before you do an AD migration. I have listed a checklist below you can use in many occasions.


  • Evaluate business requirement for active directory migration
  • Perform Audit on Existing Active Directory Infrastructure
  • Provide Plan for implementation Process
  • Prepare Physical / Virtual resources for Domain Controller
  • Install Windows server 2019 Standard / Datacenter
  • Patch Servers with latest Windows Updates
  • Assign Dedicate IP address to Domain Controller
  • Install AD DS Role
  • Migrate Application and Server Roles from the Existing Domain Controllers.
  • Migrate FSMO roles to new Domain Controllers
  • Add New Domain controllers to the Existing Monitoring system
  • Add New Domain controllers to the Existing DR Solution
  • Decommission old domain controllers
  • Raise the Domain and Forest Functional level
  • On Going Maintenance


As per the above figure domain has two domain controllers.  In here, the FSMO role holder is running windows server 2012 R2. Domain and forest functional level currently operating at Windows server 2012 R2. A new domain controller with Windows server 2019 will be introduce and it will be the new FSMO role holder for the domain. once FSMO role migration completed, Domain controller running windows server 2012 R2 will be decommissioned. After that forest and domain function level will raised to the windows server 2019.


In the demonstration, REBEL-DC2012 is the domain controller with windows server 2012 R2 and REBEL-DC2016 is the domain controller with windows server 2019.


Note – When you introduce new domain controllers to the existing infrastructure it is recommended to introduce to the forest root level first and then go to the domain tree levels.



  • Log in to the Server 2019 as a member of local administrators group.
  • Add server to the existing domain as member



  • After restart, log in to the server as Enterprise Administrator
  • Assign static IP address to the server
  • Launch the PowerShell Console as an Administrator
  • Before the configuration process, we need to install the AD DS Role in the given server. In order to do that we can use Following command.

Install-WindowsFeature –Name AD-Domain-Services -IncludeManagementTools



  • Configure the new server as additional domain controller.





-DomainName ""

-SiteName "Default-First-Site-Name"

-ReplicationSourceDC ""

-DatabasePath "C:\Windows\NTDS"

-LogPath "C:\Windows\NTDS"


-SysvolPath "C:\Windows\SYSVOL"




There are no line breaks for the command and I have listed it as above to allow readers to identify on the parameters clearly.





This cmdlet will install the domain controller in active directory infrastructure.


If you do not need to create the domain controller as global catalog server, this parameter can use. By default, system will enable global catalog feature.


This Parameter can use to define the active directory site name.  the default value is Default-First-Site-Name


This parameter defines the FQDN for the active directory domain.


Using this parameter can define the active directory replication source. By default, it will use any available domain controller. But if need we can be specific.


Once execute the command it will ask for SafeModeAdministrator Password. Please use complex password to proceed. This will be used for DSRM.


  • After configuration completed, restart the system and log back in as administrator to check the AD DS status.

Get-Service adws,kdc,netlogon,dns




Will confirm the status of the AD DS service.


Get-ADDomainController -Filter * |  Format-Table Name, IPv4Address, Site




Will list down the domain controllers along with the IP address and Sites it belongs to.


  • Migrate all five FSMO roles to the New domain controller using following command,

Move-ADDirectoryServerOperationMasterRole -Identity REBEL-DC2019 -OperationMasterRole SchemaMaster, DomainNamingMaster, PDCEmulator, RIDMaster, InfrastructureMaster


In above the REBEL-DC2019 is domain controller running with Windows Server 2019.




Once its completed, we can verify the new FSMO role holder using


Netdom query fsmo




  • The new step of the process is to decommission the old windows domain controller which running with Windows Server 2012 R2. To do that execute the following command as enterprise administrator from the relevant DC.


Uninstall-ADDSDomainController -DemoteOperationMasterRole -RemoveApplicationPartition


After execute the command it will ask to define password for the local administrator account.



Once its completed it will be a member server of the domain.


  • Next step is to raise the domain and forest functional level to windows server 2019. To do that can use the following commands.


To upgrade domain functional levels


Set-ADDomainMode –identity -DomainMode Windows2016Domain


                To upgrade forest function levels


Set-ADForestMode -Identity -ForestMode Windows2016Forest



Note – With Windows Server 2019, there is no domain or forest functional level called windows2019. It is still 2016.

Now we have completed the migration from AD DS 2012R2 to AD DS 2019. Same steps apply when migrate from windows server 2008, Windows server 2008 R2, Windows server 2012 & Windows server 2016.

  • After the migration completes, we still need to verify if its completes successfully.

 Get-ADDomain | fl Name,DomainMode


This command will show the current Domain functional level of the domain after the migration.


Get-ADForest | fl Name,ForestMode


Above command will show the current forest functional level of the domain.




Senior Member

Interesting exercise too. Here at the company we are adopting the poweshell cmdlets to perform daily activities and it is very nice to see them doing advanced activities like this :)

Occasional Visitor

Need to ensure you have migrated your FRS replication to DFS-R replication as well otherwise you will get an error when promoting the 2019 Server to a DC....

Senior Member

Interesting how you did all of this in PowerShell but didn't use PowerShell cmdlets for finding the Operations Master roles. It obviously works, but for consistency/modern scripting purposes, you may want to use the following 2 cmdlets to replace "netdom query fsmo":


Get-ADForest | select SchemaMaster,DomainNamingMaster | fl; Get-ADDomain | select PDCEmulator,RIDMaster,InfrastructureMaster | fl

Great post, Dishan. Thanks for sharing!

Occasional Visitor

CNG-DRP that is the problem that I ran into.  I currently have my Domain controllers in 2012 r2. I have demoted one of the servers but I'm afraid by migrating the FRS to DFS-R will cause a problem between my old domain controllers replicating.  Do you know if DFS-R replication works on server 2012 r2?

Occasional Visitor

In a small business environment, if I add a 2019 DC to a 2012 AD and promote the 2019 to PDC, but then leave the 2012 domain controller running as a secondary DC (better two DCs at 2012 function level than one DC at 2019 at least until another 2019 server is purchased), could I just demote the 2012 dc but leave it as a domain controller?

Occasional Visitor

@DaBoomer Your suggestion would also be my inclination. Wouldn't it even be possible to upgrade the 2012 R2 server to 2019?

Regular Visitor

Thank you Dear..!


The above setup we can do it for the Primary Domain, so what if I have other 2 additional AD Servers at other branches?


Pls advise?


New Contributor

After Migrating my 2012 R2 Server to 2019 I have a couple of issues:


c:\users\administrator.PR> dcdiag /q
There are warning or error events within the last 24 hours after the SYSVOL has been shared. Failing SYSVOL
replication problems may cause Group Policy problems.
......................... PRDC failed test DFSREvent
An error event occurred. EventID: 0xC0000466
Time Generated: 09/12/2020 10:54:40
Event String:
Active Directory Domain Services was unable to establish a connection with the global catalog.
......................... PRDC failed test KccEvent
An error event occurred. EventID: 0xC0040038
Time Generated: 09/12/2020 10:53:52
EvtFormatMessage failed, error 15027 The message resource is present but the message was not found in the message table..
(Event String (event log = System) could not be retrieved, error 0x3ab3)
......................... PRDC failed test SystemLog
Warning: DcGetDcName(GC_SERVER_REQUIRED) call failed, error 1355
A Global Catalog Server could not be located - All GC's are down.
......................... failed test LocatorCheck


Appreciate any ideas on how to fix these ?

Occasional Visitor

Which Version of  Windows server is recommended to upgrade ADDS  from  Windows Server 2012 R2 to?

Windows Server 2019 LTSC


Windows Server   SAC   version?    Windows Server, version 20H2 (Semi-Annual Channel)




Version history
Last update:
‎Apr 27 2021 07:34 AM
Updated by: