Change license key of Windows Server

Published:

Needed to install two Windows Server 2012 R2 instances today, but didn't have a valid production license key yet and didn't seem like there was a way to skip the key in the setup. Found you can remove a license key using a command, so worked around it using a temporary dev key from MSDN for the installation and then removed that key afterwards. For future self-reference, here's how...

  1. Open an elevated command prompt
  2. To remove key run slmgr -upk
  3. To add new one run slmgr -ipk NEW-KEY or use regular activation process