How to Remove Old KMS Activation and Use a Genuine Product Key

Quick Answer: How to Remove Old KMS Activation
To remove an expired or unauthorized KMS (Key Management Service) license from Windows, open Command Prompt as Administrator and run these three consecutive commands:
2. slmgr /cpky (Clears key from registry)
3. slmgr /ckms (Clears KMS server connection)
After running these commands, restart your PC. Your Windows licensing state will be reset to a clean slate, ready to accept a permanent genuine Microsoft retail key.
Table of Contents
1. What is KMS Activation and Why Remove It?
KMS (Key Management Service) is a legitimate client-server activation technology developed by Microsoft for large enterprise environments. It enables corporations and educational institutions to activate thousands of internal computers on their local corporate network simultaneously without manually entering a retail product key on every single workstation.
However, unauthorized grey-market sellers and pirate tools frequently exploit this system by redirecting a consumer’s Windows PC to an external, unauthorized KMS emulator. According to official Microsoft technical documentation, KMS client activations are temporary (typically valid for 180 days) and require continuous network check-ins. When the unauthorized server goes offline or gets blacklisted by Microsoft, Windows deactivates, triggering persistent desktop watermarks, restricted personalization settings, and error codes such as 0xC004F074.
To establish permanent activation, you must purge the external KMS server entry from your local registry so that Windows can communicate directly with official Microsoft activation servers via a genuine retail key.
2. How to Check if You Have a KMS License
Before modifying system licensing, verify whether your operating system is currently registered under a KMS volume channel:
- Click the Start menu, type cmd.
- Right-click Command Prompt and select Run as administrator.
- Type the following diagnostic command and press Enter:slmgr /dli
A Windows Script Host dialogue box will appear on your desktop. If the description displays VOLUME_KMSCLIENT channel, your computer is bound to a KMS host server, and you should proceed with the removal procedure below.
3. Step-by-Step: Removing KMS with slmgr Commands
The Software Licensing Management Tool (slmgr.vbs) is Microsoft’s official administrative utility for managing Windows product licensing. Run these three commands in sequence within an elevated Command Prompt:
Once all three confirmation dialogues appear, restart your PC. Your system is now completely decoupled from unauthorized KMS hosts.
4. How to Install Your Genuine Product Key
Installing your new product key is seamless once the KMS residue is cleared. You can activate directly through Windows Settings or via Command Prompt:
Method A: Windows Settings (Recommended)
- Press Windows Key + I to launch Settings.
- Navigate to System > Activation.
- Click Change product key.
- Enter your 25-character retail product key and select Activate.
Method B: Command Prompt (Silent Activation)
slmgr /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX// 2. Trigger online activation:
slmgr /ato5. Frequently Asked Questions
Does removing KMS delete my files or applications?
No. The slmgr /upk and slmgr /ckms commands only interact with Windows software licensing tokens and registry pointers. Your personal documents, games, and installed applications remain completely untouched.
Why does my Windows keep reverting back to KMS?
If Windows reverts back to KMS after restarting, a background third-party activator utility (e.g., AutoKMS or a scheduled task) is likely re-injecting the server address. Open Task Scheduler and check for unauthorized tasks in the Microsoft folder, or run a scan with Windows Defender to purge the emulator.
What is the difference between a KMS key and a Retail key?
A KMS key is a volume license meant for corporate networks that requires regular 180-day server check-ins. A genuine Retail key is permanently owned by you, binds directly to your personal Microsoft Account, activates through official Microsoft cloud servers, and can be legally transferred when you build or buy a new computer.




I ran `slmgr /upk` to uninstall the old key, but when I run `slmgr /dli` it still shows a KMS host port (1688) and says “Volume activation expiration: 180 days”. How do I force Windows to drop the KMS server connection completely before entering my genuine key?
Hello Christian! That is a very common scenario because
/upkonly uninstalls the product key, but leaves the KMS host IP cached in your registry. To completely purge the connection, open Command Prompt (Admin) and run these two commands:1)
slmgr /ckms(Clears the KMS host IP and port from the registry)2)
slmgr /cpky(Clears the key from the registry to prevent memory injection)After running both, restart your PC. Windows will revert to a completely clean unactivated state, ready to accept your genuine Windows 11 Pro Key for direct Microsoft cloud activation!
If I bought a used PC that came with a pirated KMS-activated Windows 10 Enterprise, do I need to format my hard drive to switch to Windows 11 Pro, or can I just remove KMS and change the edition with a retail key?
Hi Stefan! Great news: you do NOT need to format your drive or lose your files! After using the guide above to remove the KMS server (
slmgr /upkandslmgr /ckms), you can disconnect from the internet and input the generic Pro upgrade key (VK7JG-NPHTM-C97JM-9MPGT-3V66T) in Settings > Activation. Windows will perform a quick edition change in about 2 minutes. Once restarted, reconnect to Wi-Fi and input your genuine Windows 11 Pro Retail Key to activate permanently with Microsoft!