Changing the Product Key in Server 2012 using PowerShell or Command prompt
I have come across a useful set of cmd’s for when you need to change the Product Key in server 2012. When I went to active my new file server, I ran into an issue when trying to activate with the Product KMS key.
Server 2012’s system properties do not allow you to change the Product key.
To change this you need to open power shell in privileged mode and enter the following cmd’s.
slmgr -upk (this removes the current Product Key)
slmgr -ipk XXXX-XXXX-XXXX-XXXX (this installs the new Product Key)
Please see Microsoft’s Article ID: 2750773:
original post taken from:
- Deleting any files/folders from C:windowstemp and C:Users%UserName%AppDataLocalTemp
- Delete all EventViewer logs
- Save to another Disk if you want to keep them
- Remove any unused programs, e.g. Firefox
- Remove anything in C:inetpublogs
- Remove any file/folders C:WindowsSystem32LogFiles
- Remove any file/folders from C:Users%UserName%Downloads
- Remove any file/folders able to be removed from C:Users%UserName%Desktop
- Remove any file/folders able to be removed from C:Users%UserName%My Documents
- Stop Windows Update service and remove all files/folders from C:WindowsSoftwareDistribution
- Deleting an Event Logs
- Run COMPCLN.exe
- Move the Virtual Memory file to another disk
However this wasn’t enough & I found the most space was cleared by using the Disk Cleanup tool “cleanmgr.exe” but of course this isn’t installed by default on Windows Server 2008.
In order to get the Disk Cleanup you need to go to Server Manager > Add Features > and turn on “Desktop Experience”
After running the Disk Cleanup I found this gem “Hibernation File Cleaner” was using almost 7.45 GB, I’m pretty
sure I don’t need Hibernate functionality on an always on Web Server.
open an administrative power shell session and pop your new key in using the dism tool
dism /online /set-edition:ServerDatacenter /productkey:<Datacenter key, e.g. AAAAA-BBBBB-CCCCC-DDDDD-EEEEE> /AcceptEula
Window Server 2012 Products and Editions Comparison
Illustrates the differences among the various Windows Server 2012 products and editions, including information about locks and limits and supported server roles and