Upgrade Windows Server from Standard to Datacenter on the fly
In case you have installed the Windows Server 2016 Standard Edition and now want to upgrade to the Datacenter Edition, you can do this without reinstalling Windows on the fly.
To convert the Standard edition of Windows Server to the Datacenter edition, you have to execute the following commands by using the CMD or Windows Powershell.
Determine that Windows Server Standard is the current edition name by running the command below.
DISM /online /Get-CurrentEdition
Verify that Windows Server Datacenter is a valid option to convert to by running the following command.
DISM /online /Get-TargetEditions
Enter ServerDatacenter and your retail product key in the command below.
DISM /online /Set-Edition:ServerDatacenter /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX /AcceptEula
Finally we need to restart the server.
Links
Upgrade and conversion options for Windows Server
https://docs.microsoft.com/en-us/windows-server/get-started/upgrade-conversion-options
Converting Windows Server Standard edition to Datacenter edition
https://docs.microsoft.com/en-us/windows-server/get-started/upgrade-conversion-options#converting-windows-server-standard-edition-to-datacenter-edition
Converting between retail, volume-licensed, and OEM licenses
https://docs.microsoft.com/en-us/windows-server/get-started/upgrade-conversion-options#converting-between-retail-volume-licensed-and-oem-licenses