At any time after installing Windows Server 2012, you can run Setup to repair the installation (sometimes called “repair in place”) or, in certain cases, to convert to a different edition.
You can run Setup to perform a “repair in place” on any edition of Windows Server 2012; the result will be the same edition you started with.
For Windows Server 2012 Standard, you can convert the system to Windows Server 2012 Datacenter as follows: From an elevated command prompt, determine the current edition name with the command DISM /online /Get-CurrentEdition. Make note of the edition ID, an abbreviated form of the edition name. Then run DISM /online /Set-Edition:<edition ID> /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX /AcceptEula, providing the edition ID and a retail product key. The server will restart twice.
Let us suppose you have an Evaluation Version of the Windows Server and you want to convert (upgrade) it to Standard Edition:
Run the Command Prompt as Administrator then type below
C:\> DISM /online /Get-CurrentEdition
C:\> DISM /online /Get-TargetEditions
C:\> DISM /online /Set-Edition:ServerStandard /ProductKey:XXXX-XXXX-XXXX-XXXX-XXXX /AcceptEula