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:

http://support.microsoft.com/kb/2750773

 

original post taken from:

http://ryanmangansitblog.com/2012/09/04/changing-the-product-key-in-server-2012-using-powershell/

Freeing Disk Space on C: Windows Server 2008

  • 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”

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.

hibernation_file_cleaner

 

Derived from:
http://blog.willbeattie.net/2013/06/freeing-disk-space-on-c-windows-server.html

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


http://community.spiceworks.com/how_to/show/30293-howto-switch-from-windows-server-2012-standard-server-to-windows-server-2012-datacenter-server-without-having-to-reinstall