https://learn.microsoft.com/en-us/windows-server/get-started/kms-client-activation-keys
Install a product key
If you're converting a computer from a KMS host, MAK, or retail
edition of Windows to a KMS client, install the applicable product key
(GVLK) from the list below. To install a client product key, open an
administrative command prompt on the client, and run the following
command and then press Enter
:
slmgr /ipk <product key>
For example, to install the product key for Windows Server 2022 Datacenter edition, run the following command and then press Enter
:
slmgr /ipk WX4NM-KYWYW-QJJR4-XV3QB-6VM33
Below will show the License Command
slmgr /dlv
slmgr /dll
Optional
https://techcommunity.microsoft.com/t5/windows-server-for-it-pro/activationg-trial-version-of-server-2019/m-p/1203975
https://learn.microsoft.com/en-us/windows-server/get-started/kms-client-activation-keys
To change the eval version of Server 2019 to a retail version you have to use dism.
Use the following steps in and administrative command prompt:
- slmgr /upk
- slmgr /cpky
- dism /online /set-edition:ServerStandard /accepteula /productkey:<YOUR-RETAIL-KEY-GOES-HERE>
- reboot
- slmgr /ipk <PRODUCT-KEY-GOES-HERE>
- wait a minute
- slmgr /ato