While building my lab, I was not able to activate my copy of Windows Server 2012 R2 Evaluation. Here is the solution.
I did like most of you guys, I went on Microsoft website to get a copy of Windows Server 2012 R2 to host my servers. Obviously Microsoft doesn’t give away unlimited versions of its products, but evaluation versions which are limited to 180 days. See below.
Then I purchased official licenses from Microsoft and I tried to activate one of them.
To fix it, you need to follow the procedure below :
You need to use the DISM command:
dism /online /get-targeteditions
dism /online /set-edition:serverStandard /productkey <YOUR KEY> /acceptEULA
Then reboot your server. Windows will reconfigure itself.
The edition will change from Windows Server 2012 R2 Standard Evaluation to Windows Server 2012 R2 Standard.
If you license is genuine and your server is connected to the internet, you should be able to validate your license.
That’s it. Hope it helped.