In this article, we will learn how to upgrade Windows Server 2019 to 2022. What is the greatest way to upgrade Windows Server 2019 to 2022? Here, are the details and a step by step guide to help you with the upgrade. Meanwhile, a few optional and practical tools will be introduced to secure a successful upgrade.
A lot of users would love to Install Windows Server 2022 for its useful features and excellent functionalities and useful features that Server 2019 and other Server versions do not have.
Since the new version of Windows Server 2022 is much more secure, Windows Server 2019 vs 2022 many users favor experiencing the latest version and its features, this guide will provide you Windows Server 2022 upgrade path. We recommend that you should take Windows Server 2019 backup in advance. Then, you can follow this guide to start upgrading your system to Windows Server 2022.
Here is my Windows server 2019 version and it is a workgroup, please keep in mind that it’s not an active directory server.
First, make sure Server 2019 is up to date
You need to make sure whether your current operating system is up to date. Go to Settings, Update & Security, and then check for Update. If the system is outdated, you should update to the latest version.
Log in to your Windows Server 2019 and insert the media into the CD/DVD drive, then double-click it to update and install 2022.
Upgrade the Windows Server window, select the checkbox I want to help make the installation better, and then click Next.
Insert the Server 2022 product key and then click Next.
Choose the Windows Server 2022 edition which is the same as Server 2019 to install, and then click Next.
Accept the license to move on.
If you don’t select the right version, the first option will be grayed out Select the radio button to keep personal files and apps, and then select next.
Windows Server 2022 Setup analyzes your device, it will prompt you to proceed with your upgrade by selecting Install.
Server 2019 upgrade starts.
The server will restart after completing the process.
After successfully upgrading to Windows Server2022, login and then you can your Windows editions.
Continuing my mini-series on providing IT Pros valuable assistance and guides moving their workloads, roles, and Server-based applications to Windows Server 2022, here is my guide to upgrading, in-place, from Windows Server 2019 ‘Core’ to Windows Server 2022 ‘Core.’ Thankfully, the overall setup routine is similar to using the GUI (Desktop Experience) in Windows Server. But, there are some nuances and a few extra steps. Let’s get to it!
Quick Background – What is ‘Core’?
Now, now. Microsoft would be very disappointed if they heard some IT Pros asking what the ‘Core’ installation of Windows Server is and what it’s used for – the Core installation option is the recommended option. Why? Largely for security purposes and a more nimble, efficient installation base. Being able to manage servers remotely is efficient, and oftentimes, easier. Remote management tools, like Windows Admin Center, make it very simple to monitor, manage, and perform all server-related tasks. Excluding the GUI offers a more robust and safe environment, harder for hackers to exploit.
Because the vast majority of the GUI, or the Desktop Experience, is not installed, the footprint is much smaller. The fundamental structure of the O/S affords a smaller attack vector. There is no ‘explorer.exe’ to hack or exploit. There is a command-line and a limited graphical footprint. When you see the Windows Setup screens below, it looks, well, let’s be honest – not so elegant…that’s because the rich GUI development arena is missing. The engineering and development teams simulate a GUI as best they can. It’s similar to how developers sprinkled ASCII characters on your monochrome command-line only monitors to ‘draw’ things on your screen.
To manage these Core servers, you can run commands at the command line, run PowerShell cmdlets natively in the shell, or use other GUI remote management tools from other systems, like Windows Admin Center, Computer Management, and other MMC-based tools (DHCP, DNS, WSUS, IIS, etc.). For all you WAC (Windows Admin Center) fans, I’ll write up a post on this very helpful, and constantly updated tool in the coming weeks!
Upgrade Steps Outlined
If you read my article on upgrading from Windows Server 2012 R2 to Windows Server 2022, you saw the initial steps to copy the ISO for Windows Server 2022 to the desktop, right-click on it, choose Mount, and then run setup.exe. But, there is no desktop. Only this shell…
Now what? Well, the ‘workaround’ for this missing GUI element is to mount the ISO directly to your server. If you’re using Hyper-V or VMWare, just mount the ISO for Windows Server 2022 as the server’s DVD Drive. If you’re using a physical server, insert your USB stick with the installation media in the server, or use iDrac or CIMC remote tools to virtually mount the ISO. Then, choose option (15) to ‘Exit to Command Line’, and, at the command line, type:
D: (or whichever drive letter your ISO is mounted to)
then
setup.exe
Eeek. See? Not too lovely, but it gets the job done, right? No worries. Now, click Next!
Click Next.
Again, as of this writing, there are no valid VLKs (Volume License Keys) available yet. When they are, you would optionally be able to enter them here. Also, at this point in Setup, there should eventually be a link at the bottom that says ‘I don’t have a product key’, or something similar. Later after the setup is complete, you would be able to enter a key and Activate Windows. Again, this is coming soon.
So here, we will leave the default option. If Core is installed, Windows Setup will assume you want to keep it the same. We could go from Core to Desktop Experience, but, let’s keep things simple at the moment. After clicking Next…,
The biggest convenience feature of an in-place upgrade is the seamless experience going from A -> B. You don’t need to copy your files elsewhere or worry (essentially) about re-installing any applications. They will be retained. Note: ALWAYS back up the state of your server before performing any upgrades! Click Next. (If you want to wipe the slate clean, choose ‘Nothing’ above and all non-system files will be removed during Setup.
We are all set to install Windows Server 2022! Click Install.
When Setup is done, you will be back at your server, ready to login.
Conclusion – Next Steps!
That is it! Easy as cake. Pie! Easy as pie! After logging in, you’ll notice that Microsoft has made the launching of ‘SConfig’ automatic. You just need to run this PowerShell command if you would rather the server boots to the PowerShell prompt, not SConfig.
Set-SConfig -AutoLaunch $false
At this point, you can begin your application testing, validation, and finish all your standard post-setup tasks. Once you have your Volume License Key, you can run these commands at the shell to enter the key and activate Windows:
slmgr.vbs /ipk AAAAA-BBBBB-CCCCC-DDDDD-EEEEE
slmgr.vbs /ato
Coming up – more upgrades and installations to Windows Server 2022. If you have any specific scenarios you’d like me to highlight or pursue, please leave a comment!
Related Article:
- How to Install Hyper-V on Windows Server Core
Windows Server Active Directory upgrades are a part of administering Windows Server Active Directory infrastructure on-premises. Currently, businesses may have a mix of Windows Server infrastructure and many are running Windows Server 2019 domain controllers in their environment which currently offer the latest and greatest features in the realm of Windows Server Active Directory infrastructure. As the release of Windows Server 2022 looms near on the horizon, many organizations will be looking at upgrading their existing infrastructure to include Windows Server 2022 on-premises Active Directory domain controllers. In this Windows Server Active Directory upgrade guide, we will look at the steps involved to upgrade Windows Server 2019 Active Directory to Windows Server 2022.
Microsoft’s Windows Server 2022 operating system will be the latest and most advanced Windows Server operating system to date. Microsoft has steadily been making their Windows Server operating system more “cloud-aware,” with many more Azure features integrated into the operating system natively. Microsoft is vouching to have Azure be the management plane for all operations, including on-premises operations with solutions such as Azure Arc and others.
Using the new capabilities and features unlocked by using Windows Admin Center, Windows Server 2022 will have the most direct integration with Azure of any server operating system. Microsoft is certainly wanting to get everyone focused on the Azure cloud. The new integrations with Azure make Windows Server 2022 an easy way that customers get a powerful on-premises operating system with all the Azure bells and whistles offered by Microsoft and unlocked potential with Windows Admin Center.
New Security features
One of the huge themes with Windows Server 2022 is security. Let’s face it. Security is on the minds of just about everyone these days, from IT operations, security engineers, and business leaders alike. Windows Server 2022 integrates the new Secured Core implementation from Microsoft. What is secured core? It is a new set of security features at the core of Windows Server 2022 and unlocked by the right hardware underneath the hood, such as TPM 2.0.
It also includes technologies such from current hardware OEM vendors including Bitlocker, and virtualization-based security (VBS) turned on by default. With the Secured Core server, these features are enabled out of the box from the OEM manufacturer so when the customer provisions the new hardware, a strong security foundation is enabled by default.
As this guide is focused on Windows Server 2022 Active Directory, as you can imagine, having even better security enabled for physical and virtual domain controllers is certainly a step in the right direction. Attackers are looking for easy ways to compromise Active Directory environments and user account in general. Having a better security foundation as provided in Windows Server 2022 helps businesses further protect Active Directory assets.
What about other Active Directory features found in Windows Server 2022? You are not going to notice a tremendously different Active Directory interface, experience, or capabilities with Windows Server 2022. Or, any differences at all. If you are like me, you have seen a trend from Microsoft of decoupling requirements of solutions from Active Directory proper, requiring domain joins, etc, for solutions to work correctly. Microsoft sees the writing on the wall with future infrastructure. Businesses will be stitching together infrastructure that exists in on-premises environments, cloud, and edge environments.
The traditional on-premises Active Directory that we have known now for decades is fading into the past as new solutions like Azure Active Directory (Azure AD) are more enticing with the tremendous focus on cloud and cloud-native applications. With remote work being the foreseeable future for most organizations, if not the permanent configuration for employees, traditional connectivity to on-premises infrastructure, including Active Directory domain controllers is no longer realistic. VPN connections for everyone is not considered feasible any longer and contains it own set of security vulnerabilities.
Modern apps, containers, and Kubernetes
Another advancing area of focus and polishing from Microsoft is the area of containers, and specifically Kubernetes. Kubernetes is certainly where all the interest resides with containerized workloads. Kubernetes is by far the most powerful and popular container orchestration platform available. Windows Server 2022 will be able to use something known as group Managed Service Accounts (gMSAs) to provide an Active Directory identity to containers. You can do this today with domain-joined hosts, however, this will not be required with Windows Server 2022. Again, this goes back to the point of the traditional Active Directory requirements being phased out.
Upgrade Windows Server 2019 Active Directory to Windows Server 2022
So, let’s look at the process to upgrade Windows Server 2019 Active Directory to Windows Server 2022. For this run-through, I am using the Windows Server Insider Preview build 20344. What does this process look like? Well, actually not very different if at all than previous Windows versions. Here I am creating a new Windows Server 2022 VM in vSphere 7.0 Update 2. It is nice that we now have the Microsoft Windows Server 2022 option.
Here, I am joining the Windows Server 2022 server to the Windows Server 2019 Active Directory domain. This is being done after configuring the network on the Windows Server 2022 server for the domain, specifically DNS settings.
As you will see in the following screenshots, the process from Server Manager looks identical to Windows Server 2019. Here I am adding the Active Directory Domain Services (ADDS) role.
Below, I am selecting to Add a domain controller to an existing domain option and entering in the Windows Server 2019 domain.
Next, select the domain controller capabilities and site information as well as configuring the DSRM password.
DNS options.
Choose the replication options, here leaving as the default all domain controller option.
Specify the location of the AD DS database, log files and SYSVOL.
Review the options for the configuration of Active Directory on the Windows Server 2022 server.
Here is a look at the PowerShell script to perform the ADDS configuration.
Running the prerequisite check. AS you will note, there is no schema upgrades or anything listed for Windows Server 2022. It appears the same schema is used as Windows Server 2016 Active Directory, the same as Windows Server 2019.
Transferring Active Directory roles from Windows Server 2019 to Windows Server 2022
The steps below are familiar for most AD admins that have transferred roles before. But, just a quick run through of what this looks like with Windows Server 2022 – no difference. Transferring the RID, PDC, and Infrastructure Master roles below.
Transferring the domain naming master role to Windows Server 2022.
The same process of registering the Schema Management DLL must be performed for transferring the Schema Master role.
Transferring the Schema Master role.
Demoting the Windows Server 2019 Domain Controller
After transferring the roles, I went through the process in Server Manager to demote the Windows Server 2019 domain controller.
After demoting the Windows Server 2019 server, I wanted to check one last time on the Windows Server 2022 server which is now the solely available DC in the lab environment. It shows that Windows Server 2016 is the highest functional level.
Thoughts
Windows Server 2022 is a highly anticipated next release of the Windows Server operating system. It shows Microsoft’s shifting position on what features and functionality should be contained in Windows Server as well as the pivot to Azure integrated and cloud-native technologies.
As shown with the upgrade Windows Server 2019 Active Directory to Windows Server 2022 walkthrough, not much looks to have changed so far with Windows Server 2022 unless they sneak in features between the Insider Preview 20344 and the GA release. As shown, Windows Server 2016 is still the highest functional level for domains and forests at this time. Microsoft is drifting away from requiring Active Directory domain joins for most of their core features with each new Windows Server operating system release. This in itself shows where things are headed.
The post covers the steps upgrade domain controller running on Windows Server 2019 to Windows Server 2022. We will perform an in-place upgrade of a domain controller running on Windows Server.
An in-place upgrade is the solution if you want to keep the same hardware and all the server roles without flattening the server.
When you upgrade domain controller, it allows you to go from an older operating system to a newer one, while keeping your settings, server roles, and data intact.
This article can be used to perform an in-place upgrade of a domain controller running on Windows Server 2019 to Windows Server 2022.
Windows Server 2022 In-Place Upgrade Paths
When you plan to upgrade domain controller on Windows Server, it is important to check the upgrade paths. For example, when you want to do an in-place upgrade of Server 2109 to Server 2022, you first check if it’s a supported upgrade path.
I had published a guide listing all the Windows Server 2019 In-place upgrade paths. Microsoft hasn’t updated in-place upgrade paths for Windows Server 2022 yet. You don’t have to worry as upgrading a domain controller from Windows Server 2019 to Windows Server 2022 is supported.
Info – Windows Server can typically be upgraded through at least one, and sometimes even two, versions. For example, Windows Server 2016 and Windows Server 2019 can both be upgraded to Windows Server 2022.
Pre-requisites for Upgrading Domain Controller
The following list covers a few prerequisites before you upgrade domain controller from Windows Server 2019 to Windows Server 2022.
- Verify the target server meets system requirements – Most important, check the hardware requirements and confirm if your server after the upgrade can run smoothly.
- Verify Application compatibility – There is no easy shortcut for this, you have to manually test the working of applications on a test server.
- Connectivity – Check connectivity to the target server from the computer where you plan to run the in-place upgrade.
- Back up your Server before upgrade – Microsoft recommends that you back up your operating system, apps, and virtual machines before you upgrade domain controller.
- Download Windows Server 2022 – Windows Server 2022 is available for download in Microsoft Evaluation center. However, I recommend downloading the latest and a full version via Microsoft VLSC or Visual Studio subscriptions.
Check the AD Schema Version
When you plan for an in-place upgrade of a domain controller running on Windows Server, the Schema version requires an update to the latest version.
You can quickly open the PowerShell and run the following command to determine the current AD Schema version.
Get-ADObject (Get-ADRootDSE).schemaNamingContext -Property objectVersion
In a separate post, I have covered multiple methods to find the Active Directory Schema version on Windows Server. The post also lists all the AD Schema versions with objectVersion Value.
The AD Schema version of Windows Server 2022 and Windows Server 2019 is 88. So if you are upgrading the domain controller from Windows Server 2019 to Server 2022, you can skip the schema upgrade step as there are no changes with Schema version.
Run Adprep /ForestPrep
The adprep /forestprep prepares a forest for the introduction of a domain controller. You must run this command only once in the forest.
Ensure you run this command on the domain controller that holds the schema operations master role for the forest. You must be a member of all the following groups to run this command :-
- Enterprise Admins group
- Schema Admins group
- Domain Admins group of the domain that hosts the schema master
If you run the adprep /forestprep
to upgrade the schema on a domain controller running Windows Server 2019, you see this.
Forest-wide information has already been updated. The Adprep did not attempt to rerun this operation – This means you don’t need to upgrade the schema as it is on latest version.
Forest-wide information has already been updated.
[Status/Consequence]
Adprep did not attempt to rerun this operation
Run Adprep /DomainPrep
You run the adprep /domainprep command after the forestprep command finishes and after the changes replicate to all the domain controllers in the forest.
If you run the adprep /domain to upgrade the schema on a domain controller running Windows Server 2019, you see this.
Domain-wide information has already been updated. The Adprep did not attempt to rerun this operation – This means you don’t need to upgrade the schema as it is on latest version.
Upgrade Domain Controller from Windows Server 2016 to Server 2022
If you are running the AD domain controller on Windows Server 2016, and you want to upgrade to Windows Server 2022, the schema version differs.
Windows Server 2016 has Schema objectVersion Value 87 whereas the schema version of Windows Server 2022 is 88. Hence, you must run the adprep.exe /forestprep
to upgrade the schema to the latest version if you are upgrading from Server 2016 to Server 2019.
The adprep tool extends the Active Directory schema and updates permissions as necessary to prepare a forest and domain for a domain controller that runs the Windows Server 2016/2019 operating system.
To upgrade domain controller on Windows Server, you need the Windows Server media. Copy the Windows Server 2022 ISO media to the Windows Server and mount it.
From the Windows Server 2022 setup media, run the setup.exe as administrator.
On the Install Windows Server screen click Next.
To upgrade the operating system to Windows Server 2022, enter the product key and click Next.
On Select Image screen, select the correct operating system image. The Windows Server 2022 Datacenter (Desktop Experience) image is selected. Click Next.
For Applicable notices and license terms, click Accept.
On Choose what to keep screen, select Keep files, settings and apps. If you want to remove the settings, files and apps select Nothing. Click Next.
Note – Ideally, on a server running domain controller role, you should not install applications, especially the third-party software programs.
On Ready to install window, click Install. This begins the Windows Server domain controller upgrade.
Your server will restart several times during the upgrade. It is best to leave the server as it and let it complete the in-place upgrade.
The domain controller upgrade usually takes time to complete depending upon the size of your infrastructure. There are several factors that determine the time required to upgrade a domain controller.
After a couple of restarts, the Windows Server 2016 running the domain controller is upgraded to Windows Server 2022.
You can verify the Windows Server edition by opening About My PC. In the below screenshot, you see that the edition is Windows Server 2022 datacenter and version is 21H2.
And yes, the Windows.old folder is created on the C: drive after you perform domain controller upgrade.
Prajwal Desai is a Microsoft MVP in Enterprise Mobility. He writes articles on SCCM, Intune, Configuration Manager, Microsoft Intune, Azure, Windows Server, Windows 11, WordPress and other topics, with the goal of providing people with useful information.
In this post we will be upgrade existing Domain controller Windows Server 2016 to Server 2022 which is also known as in-place upgrade. For Windows Server 2022 upgrade, there are few pre-requisites to be met because we need to have latest schema applied on DC and also have to use adprep /forestprep and adprep /domainprep commands.
Table Of Contents
- Windows Server 2022 Upgrade path
- In-place upgrade from Windows Server 2012 R2 to Windows Server 2022
- In-place upgrade from Windows Server 2016 to Windows Server 2022
- In-place upgrade from Windows Server 2019 to Windows Server 2022
- Download Windows Server
- In-place Upgrade Process
- Verification steps
- Conclusion
We need to run Adprep /forestprep once in the forest, while adprep /domainprep needs to be run on each domain where we are trying to upgrade from Server 2016.
Windows Server 2022 release date is 18th Aug, 2021 with Mainstream End date specified as 13th Oct 2026 and Extended End date as 14th Oct 2031.
Windows Server 2022 Upgrade path
Not every Windows server can be upgraded to server 2022 directly. There are specific upgrade paths we need to follow. There is a nice article on Microsoft page which explains it, however it doesn’t show Windows Server 2022 server details as they still need to update it (at the time of writing this blog).
As Windows Server 2022 Schema version is exactly same as Server 2019, I am assuming the path mentioned in the image should work for In-place upgrade from Server 2012 R2 as well (haven’t tested yet). Following are the servers which can be upgraded:
In-place upgrade from Windows Server 2012 R2 to Windows Server 2022
We can upgrade. Server can directly be upgraded from Windows Server 2022. This is only valid for Windows Server 2012 R2 (not for Windows Server 2012). Hence, we can skip version 2016,2019. (Note: I still need to test this behaviour yet). However, we need to upgrade the schema before upgrade.
The steps mentioned in this article, should be applicable for Server 2012 R2 as well.
In-place upgrade from Windows Server 2016 to Windows Server 2022
We can upgrade. Server can directly be upgraded to Windows server 2022, hence we can skip 2019 version. For this version also, we need to upgrade the schema on Windows Server.
In-place upgrade from Windows Server 2019 to Windows Server 2022
We can upgrade. This is one of the easiest upgrade method as we don’t have to upgrade the schema.
Download Windows Server
Windows Server 2022 can be downloaded through Windows Server Evaluations. Windows Server 2022 iso has also been made available on Visual Studio Subscription
Once downloaded, either extract the content of ISO locally or mount the ISO.
In-place Upgrade Process
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 2022 ADPREP /FORESTPREP updates.
Verify Current AD Schema
Run the following PowerShell command (in elevated mode) to verify :
Get-ADObject (Get-ADRootDSE).schemaNamingContext -Property objectVersion
We can see objectVersion is 87, this schema version is associated with “Windows Server 2016”, 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 |
Windows Server 2022 | 88 |
We can see that Schema version 88 is same for both Servers 2019 & 2022. Hence, that’s the reason we don’t need to upgrade the schema in case of in-place upgrade from Windows Server 2019 version.
Open command prompt (elevated rights) on Domain controller and navigate to source directory of Windows Server ISO. In my case the location was d:supportadprepadprep.exe.
Run the 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.
Schema update in Windows Server 2022 uses Sch88.ldf
This process creates 2 log files under c:windowsdebugadpreplogsyyyymmddhhmmss 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.
Let’s begin installation of Server 2022. Launch setup.exe with admin rights.
Under Product key page provide the KMS client setup key. Following are the keys for your reference based upon the version you are using:
Windows Server 2022 Datacenter: WX4NM-KYWYW-QJJR4-XV3QB-6VM33
Windows Server 2022 Standard: VDYBN-27WPP-V4HQT-9VMD4-VMK7H
Click here for KMS Client Setup key provide by Microsoft.
As these are the KMS keys, this needs to be activated later with KMS server within your environment.
On Select Image page, I am going with Windows Server 2022 Datacenter (Desktop Experience) version for full GUI experience, click Next.
Under Applicable notices and license terms page, click Accept.
Under Choose what to keep, this is the page which actually helps us going with the real need of in-place upgrade without loosing files, settings and apps, click Next.
It will first check for available updates, and you might see Getting Updates.
Once ready to install, hit Install button.
Verification steps
The process will first extract the binaries to hidden folder c:$WINDOWS.~BT.
Once extracted, reboot will happen and server upgrade process will initiate.
This process might take some time depending upon the size of your infra. Once completed, login to the server.
Launch run window (press Windows + R) and type Winver, this will show the Microsoft Windows Server 2022 version 21H2 (OS Build 20348.169).
Where 20348 is the build version and 169 is the patch version which gets updated with every security update.
Open registry (regedit) and navigate to ComputerHKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersion
You will be able to see lots information, especially ProductName which I am interested in.
Conclusion
Windows Server 2022 can be upgrade from Server 2019, Server 2016 and probably with Server 2012 (yet to test). Important thing to consider is to upgrade the schema from Server 2016 and 2012. Upgrading from Server 2019 doesn’t require Schema upgrade as schema version is 88, which is same for both Server 2019 & Server 2022. Running adprep commands are the crucial steps to perform while planning to upgrade domain controller.