Scenario: You downloaded the evaluation copy of Windows Server and you have 180 days to test out whatever you are working on. Fast forward a few months and you only have a few days left and you are so happy with how it works, you go out and buy the whole license key. When you go to apply the license key under System, you get a big ol' error that says: "This edition cannot be upgraded."
You can use the DISM tool to figure out what versions of Windows Server you can upgrade to, and also use the tool to help change the product key of the version installed.
Easy enough, let's go ahead and open up command prompt as an administrator (right click on windows flag/start icon, Command Prompt (Admin):
Execute the following command to find out what versions you can upgrade to:
Dism /Online /Get-TargetEditions
In this case, you can see I can upgrade to ServerStandard or ServerDatacenter
Next, let's go ahead and actually upgrade the edition and inject my license key:
Dism /Online /Set-Edition:TheEditionListedYouWantToGoTo /AcceptEula /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
Viola! At this point, I simply need to reboot and my instance will be upgraded accordingly.