Upgrade Domain Controller From Server 2016 to Server 2019

First read the whole article and use the command lines for kompserver.nl at the end.


In this post we are are going to upgrade Domain Controller from “Server 2016” to “Server 2019”, this is also known as in-place Upgrade. There are few Pre-requisites. You will need to run adprep /forestprep and adprep /domainprep manually. Adprep /forestprep needs to be run only once in the forest. Adprep /domainprep needs to be run once in each domain in which you have domain controllers that you are upgrading to Windows Server 2016.

If you try to run in-place upgrade process without running adprep tool you will get following error as shown in the image:
Active Directory on this domain controller does not contain Windows Server 2019 ADPREP /FORESTPREP updates.

Before starting upgrade, lets verify current OS Version, open Windows + run and type “Winver”, this will show current OS version and build:

Verify Current AD Schema

Verify current AD schema by running Powershell (in elevated mode) and run following command:

 Get-ADObject (Get-ADRootDSE).schemaNamingContext -Property objectVersion 

You can see objectversion is showing as 87, which means we have “Windows Server 2016” schema, here is more information on various schema numbers:

AD version objectVersion
Windows Server 2000 13
Windows Server 2003 30
Windows Server 2003 R2 31
Windows Server 2008 44
Windows Server 2008 R2 47
Windows Server 2012 56
Windows Server 2012 R2 69
Windows Server 2016 87
Windows Server 2019 88

Copy the Windows Server 2019 source to “c:\Server 2019”, this source contains the adprep utility under support\adprep folder:

Open command prompt (in elevated mode) and navigate to location c:\Server 2019\support\adprep. Run Command “adprep.exe /forestprep

Type C and press Enter to continue with upgrade of Schema. This will upgrade current schema version from 87 to 88.

This process creates 2 log files under c:\windows\debug\adprep\logs\yyyymmddhhmmss with name ADPrep.log & ldif.log.
ADPrep.log will show you successful upgrade of Schema.
ldif.log will show you attributes which has been extended to schema such as ms-PKI-DPAPIMasterKeys, ms-PKI-RoamingTimeStamp and others.

Run “Adprep.exe /domainprep” to update the domain-wide information

Lets begin with Windows Server 2019 in-place Upgrade process by navigating to c:\Server 2019. Right click setup.exe and select “Run as Administrator“.

Next page will show the information whether to update , lets select “Not right now” and click on Next.

Select Image “Windows Server 2019 Datacenter (Desktop Experience)” as our current Operating System is Server 2016 Datacenter (Desktop Experience).

Under “Applicable notices and license terms”, click “Accept” to continue

Under “Choose what to keep” page, select “keep personal files and apps” to retain all files and applications and click “Next”

Under “Ready to Install” page, click on “Install” to begin the in-place upgrade process.

This process will first extract binaries under hidden folder “c:\$WINDOWS.~BT“.

Once extracted, system will reboot and server upgrade process will initiate.

Once upgrade process is completed, you can login to Domain Controller. Open Windows + R and run “Winver” to show OS version. This will show OS version as 1809 (ie Server 2019) and build version as 17763.xx

Command lines for kompserver.nl
On E (software) stands the extracted iso SW_DVD9_Win_Server_STD_CORE_2019_1809.10_64Bit_English_DC_STD_MLF_X22-47318

C:\Users\Administrator>cd E:\windows_server_2019\SW_DVD9_Win_Server_STD_CORE_2019_1809.10_64Bit_English_DC_STD_MLF_X22-47318\support\adprep

C:\Users\Administrator>E:\windows_server_2019\SW_DVD9_Win_Server_STD_CORE_2019_1809.10_64Bit_English_DC_STD_MLF_X22-47318\support\adprep\adprep.exe /forestprep


Before running adprep, all Windows Active Directory Domain Controllers in the forest must run Windows Server 2003 or later.

You are about to upgrade the schema for the Active Directory forest named 'kompserver.nl', using the Active Directory domain controller (schema master) 'WIN-90VACHK9RPI.kompserver.nl'.
This operation cannot be reversed after it completes.

[User Action]
If all domain controllers in the forest run Windows Server 2003 or later and you want to upgrade the schema, confirm by typing 'C' and then press ENTER to continue. Otherwise, type any other key and press ENTER to quit.


Current Schema Version is 87

Upgrading schema to version 88

Verifying file signature
Connecting to "WIN-90VACHK9RPI.kompserver.nl"
Logging in as current user using SSPI
Importing directory from file "E:\windows_server_2019\SW_DVD9_Win_Server_STD_CORE_2019_1809.10_64Bit_English_DC_STD_MLF_X22-47318\support\adprep\sch88.ldf"
Loading entries........
7 entries modified successfully.

The command has completed successfully
Connecting to "WIN-90VACHK9RPI.kompserver.nl"
Logging in as current user using SSPI
Importing directory from file "E:\windows_server_2019\SW_DVD9_Win_Server_STD_CORE_2019_1809.10_64Bit_English_DC_STD_MLF_X22-47318\support\adprep\PAS.ldf"
Loading entries....................
26 entries modified successfully.

The command has completed successfully
Adprep successfully updated the forest-wide information.

C:\Users\Administrator>E:\windows_server_2019\SW_DVD9_Win_Server_STD_CORE_2019_1809.10_64Bit_English_DC_STD_MLF_X22-47318\support\adprep\adprep.exe /domainprep
Adprep successfully updated the domain-wide information.