When you try to upgrade Windows Server 2019 Evaluation version to a licensed full version using a MAK volume license key you may receive below error message.
The specified product key could not be validated.
Check that the specified product key is valid and that it matches the target edition.
To fix this first you have to install a KMS client key using DISM command line tool. Keys are available on https://docs.microsoft.com/en-us/windows-server/get-started/kmsclientkeys (Get your respective key from “Windows Server LTSC/LTSB versions” section)
Now open CMD or PowerShell with administrative privileges and execute below command.
DISM /Online /Set-Edition:ServerStandard /ProductKey:N69G4-B89J2-4G8F4-WWYCC-J464C /AcceptEula
For more details on “Set-Edition” option follow the article in here.
Once the above command is successfully executed you will prompt for restart the server. Restart the server and execute the below command to install the new MAK key which is available on Volume Licensing Service Center.
slmgr /ipk <product key>
Now the Windows Activation should have completed successfully.