CF Webtools is part of the Microsoft Network which gains us access to software for development purposes. But one gotcha is if you try to apply the license key to an already installed evaluation version of Windows Server. In this case Windows Server 2012 R2.
When you try to change the product key in the UI, it says that this product key can not be used on this version of Windows. Not that the key and evaluation type are the same standard 2016 R2 edition.
To get around this use the “DISM” command.
To determine the installed edition, run:
DISM /online /Get-CurrentEdition
To check the possible target editions, run:
DISM /online /Get-TargetEditions
Finally, to initiate an upgrade, run:
DISM /online /Set-Edition: /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXX /AcceptEula
A server restart will be required.
Note: Legally check your license. This is technical advice only.