This section assumes you have selected “I don't have a product key” during the installation. All there is to do is install the GVLK for your Windows version.
Install the GVLK for your version of Windows. Use this key table.
slmgr.vbs /ipk WX4NM-KYWYW-QJJR4-XV3QB-6VM33
Set the py-kms server
slmgr.vbs /skms py-kms.example.com:1688
Activate Windows against the new KMS server
slmgr.vbs /ato
Verify the licensing info
slmgr.vbs /dlv
Reboot to ensure all configuration is applied.
Convert a Windows Server Evaluation license to a GVLK.
I'll be activating Windows Server 2022 Datacenter in this guide. (GVLK Key WX4NM-KYWYW-QJJR4-XV3QB-6VM33)
Run the following commands in PowerShell (admin mode).
Uninstall the existing product key and return Windows to a trial state
slmgr.vbs /upk
Remove the existing product key from the Windows Registry
slmgr.vbs /cpky
Install a dummy product key
slui /ipk WX4NM-KYWYW-QJJR4-XV3QB-6VM33
Register online. You should see a progress bar during this step.
DISM /Online /Set-Edition:ServerDatacenter /ProductKey:WX4NM-KYWYW-QJJR4-XV3QB-6VM33 /AcceptEula
You should be prompted to reboot - do it.
Back in PowerShell (admin mode), uninstall the existing product key and remove it from the Windows Registry
slmgr.vbs /upk
slmgr.vbs /cpky
Install the GVLK for your version of Windows. Use this key table.
slmgr.vbs /ipk WX4NM-KYWYW-QJJR4-XV3QB-6VM33
Set the py-kms server
slmgr.vbs /skms py-kms.example.com:1688
Activate Windows against the new KMS server
slmgr.vbs /ato
Verify the licensing info
slmgr.vbs /dlv
Reboot one last time to ensure all configuration is applied.