Step 1: You open cmd (run as administrator), then you type
dism /online /get-targeteditions
Step 2: You copy and paste this code in cmd
If you want to upgrade to Windows Server 2016 Standard you type:
dism /online /set-edition:serverstandard /productkey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX /accepteula
Note:
if you see “upgrade failed”, you restart your Windows Server 2016. It will upgrade Windows Server 2016 Evaluation to Standard.