When a new VM or dedicated server is setup with a Windows Server OS, it can be deployed with the Evaluation mode if for some reason the KSM or license/product activation is unable to verify or receives an error.
It is recommended to run a Windows update to ensure you have the latest fixes as some activations can be caused by missing updates or changes.
To update the OS from Evaluation to a licensed retail edition use the following steps to update and apply the license:
First, check the version that's running with this command:
DISM /online /Get-CurrentEdition
You will get a response displaying your current version. In this process we expect an Evaluation version of your Windows Server version.
Now we can get the list of editions you can convert your current Evaluation edition to:
DISM /online /Get-TargetEditions
Then you should get the following output:
Now that you know which edition you can target, run the following command:
DISM /online /Set-Edition:ServerXXXXXXX /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX /AcceptEula
* If you do not have the product key, please ask your service provider for the required key or ask them to apply this change for you.
So to upgrade from Evaluation to Standard, use the following command:
DISM /Online /Set-Edition:ServerStandard /ProductKey:xxxxx-xxxxx-xxxxx-xxxxx-xxxxx /AcceptEula
From Evaluation to Datacenter, use the following command:
DISM /Online /Set-Edition:ServerDatacenter /ProductKey:xxxxx-xxxxx-xxxxx-xxxxx-xxxxx /AcceptEula
You will get a prompt to reboot the server which will change its edition.
You should then see your Windows service is activated with a valid retail license.