Open an administrative command prompt
Use
DISM /online /Get-TargetEditions
to list the versions you can
upgrade to. They are listed under "Target Edition"
To upgrade from Evaluation to Standard use
DISM /online
/Set-Edition:ServerStandard /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
/AcceptEula
You should be prompted to reboot.
This will not work for Evaluation Domain Controllers. See here