slmgr (Software Licensing Management Tool) is the built-in Windows command that controls everything about activation — installing keys, activating, checking status, clearing keys and troubleshooting. Every command on this page works on Windows 11, Windows 10, Windows 8.1 and Windows Server.
cmd, right-click Command Prompt and choose Run as administrator. Most slmgr commands fail silently without this.The four commands you’ll actually use
slmgr /ipk YOUR-KEY — install a product key
Applies a 25-character product key to Windows. This replaces whatever key is currently installed.
slmgr /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXXInclude the dashes. If you get an error here, the key doesn’t match your installed edition — check Settings → System → About.
slmgr /ato — activate online
Tells Windows to contact Microsoft’s activation servers and activate with the installed key. This is the command you run right after /ipk.
slmgr /atoslmgr /xpr — is Windows activated?
The quickest status check. Returns either a permanent activation confirmation or an expiry date.
slmgr /xprslmgr /dlv — detailed licence information
Shows the licence name, description, partial product key (last 5 characters), licence status and remaining rearm count. This is the command to run before opening a support ticket.
slmgr /dlvFull command reference
slmgr /ipk <key>— install a product keyslmgr /ato— activate Windows onlineslmgr /dli— basic licence info (short version of /dlv)slmgr /dlv— detailed licence infoslmgr /xpr— show activation expiry / permanenceslmgr /upk— uninstall the current product keyslmgr /cpky— clear the product key from the registryslmgr /rearm— reset the activation timerslmgr /dti— display the installation ID (for phone activation)slmgr /atp <confirmation-id>— activate with a confirmation IDslmgr /skms <host>— set a KMS server (volume licensing only)slmgr /ckms— clear the KMS server settingslmgr /rilc— reinstall licence filesslmgr /ato /?— show help for any switch
Common recipes
Install a new key and activate
slmgr /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
slmgr /atoThe standard two-step. Full walkthrough in our change product key via CMD guide.
Activate by phone (when online activation fails)
slmgr /dti
slmgr /atp YOUR-CONFIRMATION-ID/dti gives you the installation ID; you exchange it for a confirmation ID and feed that back with /atp. Our Confirmation ID tool handles that exchange for you — this route works when online activation refuses.
Remove a key before selling or handing over a PC
slmgr /upk
slmgr /cpky/upk uninstalls the key; /cpky also wipes it from the registry so it can’t be read back.
Fix “DNS name does not exist” on a Volume ISO
slmgr /ckms
slmgr /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
slmgr /atoThis clears a stale KMS setting and forces Windows to use your key directly. More context in our activation error code decoder.
Notes and gotchas
sluivsslmgr—slui 3opens the graphical “enter a product key” box andslui 4opens the phone-activation wizard. Useful when you prefer a dialog.- Windows Server — the same commands apply. See activating Windows Server by phone.
- Office is different — Office uses
ospp.vbs, notslmgr. See how to change your Office product key. - No output? You almost certainly aren’t running as administrator.
Need a genuine key?
Every key we sell is genuine, delivered instantly on your order confirmation page, and backed by a 7-day activation warranty. Browse Windows, Office or Windows Server — or use our Windows Edition Finder if you’re unsure which edition fits. Stuck on an activation problem? Open a support ticket.
Frequently Asked Questions
What does slmgr stand for?
Software Licensing Management Tool. It’s the built-in Windows script that manages product keys and activation from the command line.
Do I need administrator rights to run slmgr?
Yes for anything that changes state (/ipk, /ato, /upk, /rearm). Read-only checks like /xpr may work without it, but running as administrator is the reliable approach.
How do I check if Windows is activated from the command line?
Run slmgr /xpr for a quick answer, or slmgr /dlv for full licence detail including the last five characters of the installed key.
What’s the difference between slmgr /upk and /cpky?/upk uninstalls the product key from Windows. /cpky additionally removes it from the registry so it can’t be read back off the machine.
