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
Happy activating.
Oh, thanks, you really saved my day.
I wonder, why Microsoft put their stupid metro into new 2012 server but didn’t bother to implement a stupid button “Change product key” into their system… My activation kept failing after clean installation.
Thanks for your feedback,
I have reported this to Microsoft so i hope that they include this within a update, or Service Pack 1.
Good question. Does Microsoft REALLY expect system admins to install touch screens in all their data centers? The Metro theme on Server is flat out annoying.
Yeah, the metro interface is really stupid for server and windows in general. I instead installed “Classic Shell” to get the classic start menu back. Now my server is 100% usable.
Thanks I had this exact issue.
now how do i open PS in privliged mode?
Right click on the powershell icon and select run as administrator.
I have a licensed copy of Server 2012 and a MAK key; and no “Change product key” option in System settings. Does this “ipk” command option of slmgr (which is specifed for a KMS key) work for a MAK key?
Software Licensing management tool (SLMGR) is used for KMS licensing using scripts or configuring Server core installations.
The Powershell Command slmgr -ipk installs Product Keys (i)install(PK)product key, if you would like to Uninstall a product use (u) instead of (i) this will work with MAK and KMS product keys.
Thanks Ryan, slmgr -upk and “slmgr -ipk with my MAK product key” worked for the activation of Server 2012 : )
Thanks, this was very helpful.
thanks for your help this is great ways that you show
i apreciate this
thanks very much this is very helpful for me i tried in other pages on the internet but this is the one
Just curious, I was trying to remove an enterprise LIC Key and replace it with the developer license key… I can do the slmgr -upk but the slgmr -ipk, failed when I entered the developer key…. Got any suggestions.
Unfortantly this is something i havent come across, have you tryed the below.
From an elevated command prompt, determine the current edition name with the command DISM /online /Get-CurrentEdition. Make note of the edition ID, an abbreviated form of the edition name. Then run DISM /online /Set-Edition: /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX /AcceptEula, providing the edition ID and a retail product key. The server will restart twice.
Dism.exe http://go.microsoft.com/fwlink/?LinkId=192466
List Available Editions
Use DISM /online /Get-TargetEditions to list available editions for upgrade. To upgrade from evaluation to standard use DISM /online /Set-Edition:ServerStandard /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX /AcceptEula. The command promps for reboot; it does not reboot automatically
Convert Windows Server 2012 Standard Edition to Datacenter Edition
dism /online /set-edition:ServerDatacenter /ProductKey:48HP8-DN98B-MYWDG-T2DCC-8W83P /AcceptEulay
RYAN, YOU ARE MY HERO!!!
Dear Microsoft, why didn’t you add a simple f*cking button in your assf*cking METRO GUI for that feature???
in other words: Ich kann nicht essen was ich bei M$ Produkten kotzen könnte!
Thanks Ryan.. Was a great help.
Amarpreet Singh
Thanks a lot Ryan. You saved my day 🙂
Thanks man, i found also this great article: http://blog.viitaila.fi/2013/01/28/changing-the-product-key-of-windows-from-mak-to-kms-with-a-powershell-script/
Thank you Ryan, you saved me a bunch of grief.
Ian
Just as an fyi, with slmgr you aren’t using a powershell cmdlet, it’s the same as activating it from a cmd shell.
FYI, I did not state that the cmd’s used are Powershell cmdlets, I am referring to the using powershell to run the command prompt commands. Command Prompt is now on its way to becoming depreciated so it makes sense and is best practice to use PowerShell to run commands.
Best Regards,
My bad then, typically when someone says they have a way to do something using powershell they mean that they’re doing it using a cmdlet or the .Net framework, something native to powershell. You’re taking advantage of how powershell will run cmd.exe transparently to execute legacy commands. Slmgr being a vbscript your post could just have easily been titled, “Use VBScript to Change Product Keys”.
It’s like saying use powershell to get ip info, open powershell and type ipconfig…
Best Regards,
Jason 😉
Hmm… I’m wondering where my other coment went. I can say I solidly depreciate when people don’t use deprecated 😦
All Comments of a argumentative nature will be removed, everyone has a right to an option and posts can be interpreted in different ways. Please keep questions focused on the subject matter.
Best Regards,
Ryan, pointing out the function of the PowerShell console is not being argumentative, I understand it may be sensitive to have your article corrected but it doesn’t change the nature of my comment.
The subject matter, according to your title, is using PowerShell to change a product key. You’re using a PowerShell console to run a vbscript, as opposed to setting the correct registry key and restarting the appropriate service. I was hoping to avoid digging into slmgr.vbs by selecting an article titled, “Changing the product key Using PowerShell”. Unfortunately, I found this article instead…
Like I was said in my now deleted comment, if the article title says you’re doing something using PowerShell then people will expect something involving a little more than having PowerShell call cmd.exe.
I think it’s perfectly appropriate to wrap PowerShell syntax around other command line utilities, Jeffrey Hicks has a series of articles on the subject and I’ve even posted functions in the technet gallery that essentially just run qwinsta and rwinsta to manage rdp sessions.
What you describe would work If you entered slmgr into the run prompt and cannot be invoked remotely using psremoting. Because my question is still unanswered I’ll be happy to share a link here when I find out how to manage product keys using PowerShell.
Best Regards,
Jason
Dear Jason,
Thank you for your post,
No comments have been deleted please see above, comments are to be approved before they are posted on this site. This post is purely for changing the default KMS Key to MAK.
The article is correct as it stats “using PowerShell” (Application) not PowerShell cmdlets This can be interpreted in different ways and i take on board you views. The article could have been easily called something else but i choose to use the “Changing the Product Key in Server 2012 using PowerShell”.
I believe you would be looking for something along the lines of the following:
http://en.community.dell.com/techcenter/virtualization/w/wiki/mass-vm-activation-with-powershell-powercli.aspx.
There is no question for sensitivity, but all questions are to be directed towards the topic in question. Article names can be easily questioned and its the authors right to name their posts.
This blog expresses my personal opinions as per the disclaimer.
I hope this provides closure,
Best Regards,
Ryan,
Thanks for your help and It was cool of you to allow my comment through. The article you’re linking to there still uses slmgr so it’s not quite what I’m hoping for. Regardless, it was nice of you to post it and I appreciate the help.
Thanks,
Jason
Thanks you just added me to the list of readers.
Thank you, I have been search for this and now my License is fixed.
Hi Ray, I have applied the Window powershell and it gives out error: 0xC004F069 on the computer running Microsoft Windows non-core edition run ‘slui.exe 0xC004F069 to display the error txt
What version of windows are you using ? have a look at the following technet article: http://social.technet.microsoft.com/Forums/windows/en-US/0b5a2ba0-67c9-4575-85d9-c16030c09fca/my-question?forum=w81previtpro
I believe this specific post , “Changing the Product Key in Server 2012
using PowerShell | Ryan Mangan’s IT Blog”, very compelling plus the post was in fact a very good read. Thank you,Tyrone
Prior to upgrading to Windows 8.1 from Windows 7, I could license a Windows 7 computer remotely by typing: slmgr.vbs COMPUTERNAME-ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX. from an administrative CMD prompt. Now I get the error below when attempting to do so. You would think MS would have assumed backwards compatibility would have been required…
—————————
Windows Script Host
—————————
The remote machine does not support this version of SLMgr.vbs
Nice! Ran into this today and this helped me avoid reinstalling from a different ISO hah. Thanks again!
This may be of interest to some also. I came across this and it works fine for me. I the power shell window type — slui 3
A window will come up for you to type the product key and activate.
Thanks for the Contribution, I like the Slui 3 works 🙂
Worked like a charm!!
this actually worked for me and now my operating system is activated. I don’t know how i forgot all about the slmgr upk and ipk simple command on powershell. Thank for the info.
Thank you very much. your provided solution is working fine.