On Windows Server 2016, when attempting to enter a full edition product key on an evaluation edition, you will get the error: "This edition cannot be upgraded". Fortunately, you can workaround the issue by "upgrading" via DISM (a built-in command-line tool).
Note that you will have to reboot the server when performing the upgrade, so schedule some downtime for it. Also, you cannot only convert full GUI versions of Windows Server. Server Core or Nano Server cannot be upgraded. Additionally, if you have the ADDS role installed, you need to uninstall this role before performing the upgrade.
Start an elevated command prompt, then type in the commands listed below.
First, make sure you are really running an evaluation edition:
dism /online /Get-CurrentEdition
The result should list ServerStandardEval as the current edition. If it is, you can go ahead with the upgrade.
Optionally (if you already know this, you can skip this step), check to which edition you can perform the upgrade. Usually, you can either upgrade to Standard (non-eval) or directly to Datacenter, if you have a DC key.
dism /online /Get-TargetEditions
For the evaluation edition you downloaded from the Microsoft website, these target editions are available:
Next, you can run the upgrade to the edition of your choice. If you have a MAK key, paste that key in, or use the public KMS key for Windows Server 2016 (used in the command) if you have a KMS in your network.
dism /online /Set-Edition:ServerStandard /ProductKey:WC2BQ-8NRM3-FDDYY-2BFGV-KHKQY /AcceptEula
dism /online /Set-Edition:ServerDatacenter /ProductKey:CB7KF-BWN84-R7R2Y-793K2-8XDDG /AcceptEula
Wait for the upgrade to complete, then restart the server when prompted. After the reboot, you can check with winver.exe to confirm the version upgrade.
If you used the KMS key and have a KMS in your network, you can trigger the activation: