I'm having a hard time finding and answer to this. If I had to hypotheitcally remove the Windows license key from a VM that's been specifically setup for a partner, and it needs to be removed before the VM is handed over, how would I go about doing this? Naturally the built-in 30 day grace period has expired and I'm using an MSDN license key, but I need to remove the key before handing the VM off. The recipient can input their own license key. e.g. how do I reset the Activation Key Wizard's nagging?
Asked
Active
Viewed 5e+01k times
65
-
1Is there a way to start an IT Pro Technician stack overflow community. There are coffee and beer brewing but no IT Tech. – Adolfo J Barreto May 06 '19 at 13:03
2 Answers
153
Open a command prompt as an Administrator.
Enter
slmgr /upk
and wait for this to complete. This will uninstall the current product key from Windows and put it into an unlicensed state.Enter
slmgr /cpky
and wait for this to complete. This will remove the product key from the registry if it's still there.Enter
slmgr /rearm
and wait for this to complete. This is to reset the Windows activation timers so the new users will be prompted to activate Windows when they put in the key.
This should put the system back to a pre-key state.

starball
- 20,030
- 7
- 43
- 238

Justin Pearce
- 4,994
- 2
- 24
- 37
-
1This solved my problem. +1. Is there a way of doing the above via the GUI? – Ian Lewis May 05 '16 at 19:52
-
4@IanLewis The `slmgr` tool was never designed for end users to reset their Windows 7 / Vista state and, as such, has no GUI interface. – Justin Pearce May 10 '16 at 14:12
-
C:\Windows\System32>wscript slmgr.vbs /upk for those with altered default vbs action to edit or something else. – JasonXA May 10 '17 at 15:28
-
Do I need to use any of this before formatting the disk and reinstalling Windows with the same key? – cubuspl42 Dec 13 '17 at 18:46
-
@cubuspl42 No. This removes the current licensing from an existing installation so that a new key can be installed. – Justin Pearce Dec 14 '17 at 15:40
-
1The best answer I found online for this problem. Also works for Windows 10! – jbx Oct 22 '21 at 21:28
-
Tried this with Parallels Desktop and Windows 10. Work great! Thank you. – ScottyG Nov 17 '21 at 16:46
5
On Windows XP -
- Reboot into "Safe mode with Command Prompt"
- Type "explorer" in the command prompt that comes up and push [Enter]
- Click on Start>Run, and type the following :
rundll32.exe syssetup,SetupOobeBnk
This will reset the 30 day timer for activation back to 30 days so you can enter in the key normally.

Kraang Prime
- 9,981
- 10
- 58
- 124