This article will help you how to upgrade Server 2016 to 2022. If you wish to keep the same hardware and all your server roles you have already set up without demolishing the server, you will need to do an in-place upgrade. In-place upgrades allow you to go from an older operating system to a new operating system while keeping server roles, settings, and data intact.
Before you Start in-Place Upgrade
Before you begin Windows Server 2016 upgrade, we recommend that you need to collect some information from your system, for troubleshooting and diagnostic purposes. Because this information is aimed for use only if the upgrade fails. You should make sure that you saved the information someplace that you can get to it off of your device.
Before starting to upgrade, have an Overview of Windows Server upgrades.
How to Collect System Info
Run a command prompt with admin rights, go to C:\Windows\system32, and then enter systeminfo.exe. Please store the resulting system information someplace off of your device.

Enter ipconfig /all into the CMD let, and then saved the resulting configuration information into the same place as above.

Verify Server Build Version
Open the Registry Editor and then go to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion location. Saved the Windows Server BuildLabEx (version) and EditionID (edition).

Once you have stored all of your Windows Server related information. Now you need to back up your operating system. Please make sure that no virtual machines running during the upgrade.
To Perform the Upgrade Server 2016 to 2022
Insert the Windows Server 2022 Setup media, and then run setup.exe.

Windows Server Setup page, tick the box “Get updates, drivers and optional features (recommended), and then choose next.

It depends on the distribution channel that you received server media from (Volume License, OEM, etc.) and the license for your server in 2022, you need to enter a licensing key to continue.

Choose the Windows Server 2022 edition you wish to upgrade, and then choose next.

Accept the terms of your licensing agreement.

Tick the box “Keep personal files and apps” to choose to do an in-place upgrade, and select next.

Once the server setup analyzes your device, it will induce you to proceed with the upgrade by selecting on the Install button.

The in-place upgrade begins and shows you the Upgrading Windows screen with its progress. During the server upgrade process, the server will restart.

Working on updates

Verify Server Upgrade
Once your upgrade done, you need to make sure the upgrade to Windows Server 2022 was successful.

To Make Sure Server Upgrade was Successful
Open server Registry Editor, go to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion, and view the ProductName. You will see the edition of Windows Server 2022, for example Windows Server 2022 Datacenter.

Now you need to make sure all of your apps are running and your users connections to the applications are successful.
Refer this article to get more information.


