How to Use SLMGR Commands in Windows for Activation Tasks
If you’ve ever run into issues with Windows activation or needed to activate multiple systems in a network SLMGR is your best friend. But it’s not as scary as it sounds. In fact, once you know the right commands, slmgr.vbs can save you time and headaches.
Table of Contents
In this guide, I’ll break down what SLMGR is, when you should use it, and how to run its most useful commands step by step.
What is SLMGR?
SLMGR stands for Software Licensing Management Tool. It’s a command-line utility included in Windows that lets you manage Windows software licensing and activation.
You access it by running slmgr.vbs a VBScript file through Command Prompt or PowerShell.
Think of it like a Swiss Army knife for product keys, activation, rearming, and license management.
When Should You Use SLMGR?
Here are a few practical use cases where SLMGR comes in handy:
- Activating Windows manually
- Changing your product key
- Extending activation grace period
- Checking activation status
- Managing KMS clients and servers
- Troubleshooting activation errors
It’s especially helpful for IT admins handling large deployments or advanced users looking to dig deeper into activation mechanics.
TL;DR – Key SLMGR Commands Cheat Sheet
| Task | Command |
| View license info | slmgr.vbs /dli |
| View detailed info | slmgr.vbs /dlv |
| Activate Windows | slmgr.vbs /ato |
| Install new product key | slmgr.vbs /ipk <key> |
| Uninstall product key | slmgr.vbs /upk |
| Clear product key registry | slmgr.vbs /cpky |
| Rearm license | slmgr.vbs /rearm |
| Set KMS server | slmgr.vbs /skms <server> |
| Remove KMS server | slmgr.vbs /ckms |
| Check activation expiration | slmgr.vbs /xpr |
How to Launch SLMGR
Before we dive into specific commands, here’s how to run SLMGR properly:
Step 1: Open Command Prompt as Admin
- Click Start, type cmd
- Right-click Command Prompt > Run as administrator
Or use the shortcut:
Windows Key + R, type cmd, hit Ctrl + Shift + Enter
Step 2: Run SLMGR
Now you’re ready to start using slmgr commands. Use this format:
slmgr.vbs /option
You can also use:
cscript slmgr.vbs /option
This method shows clearer output if you’re using PowerShell.
Essential SLMGR Commands & What They Do
Here’s a breakdown of the most useful SLMGR commands with clear explanations and examples.
Check License Info
slmgr.vbs /dli
What it does: Displays basic license info like activation status, product key channel (Retail, OEM, or Volume), and remaining grace period.
Use this when: You want a quick overview of your system’s activation status.
Detailed License Info
slmgr.vbs /dlv
What it does: Shows extended details like license status, partial product key, expiration dates, KMS info, etc.
Use this when: You’re troubleshooting activation problems or verifying license type.
Activate Windows
slmgr.vbs /ato
What it does: Forces Windows to attempt online activation immediately.
Tip: Make sure you’re connected to the internet. If you’ve recently changed your product key or fixed activation issues, this command helps reinitiate activation.
Change Product Key
slmgr.vbs /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
What it does: Installs a new product key.
When to use: If you’re upgrading from a trial version or switching to a legitimate retail key.
Remove Product Key
slmgr.vbs /upk
What it does: Uninstalls the current product key.
Warning: This doesn’t remove activation just the key. It’s useful before transferring the license to another PC.
Clear Product Key from Registry
slmgr.vbs /cpky
What it does: Removes the key from the Windows registry so it doesn’t get exposed via system tools or registry viewers.
Security tip: Always run this after /upk if you’re handing the system to someone else.
Rearm the Activation Timer
slmgr.vbs /rearm
What it does: Resets the activation grace period back to 30 days.
Limit: You can only do this up to 3 times per installation.
When it helps: If you’re testing a system or need more time before applying a product key.
Set KMS Server
slmgr.vbs /skms kms.yourserver.com
What it does: Specifies a custom KMS (Key Management Service) server.
IT Use Case: Use this in enterprise environments where you activate Windows via an internal KMS host.
Clear KMS Server
slmgr.vbs /ckms
What it does: Removes any custom KMS configuration.
Helpful when: Switching from a KMS server to retail or MAK activation.
Activate via KMS
slmgr.vbs /ato
Once you’ve set a KMS server, this command tells the client to activate with it.
Real-World Example Scenarios
Let’s walk through a few common SLMGR usage scenarios:
Scenario 1: You bought a new Windows key and want to activate it
Steps:
- Uninstall old key: slmgr.vbs /upk
- Clear from registry: slmgr.vbs /cpky
- Add new key: slmgr.vbs /ipk
- Activate: slmgr.vbs /ato
Done!
Scenario 2: You want to rearm a Windows installation to extend its trial period
Steps:
- Check remaining rearm count (use /dlv)
- Run: slmgr.vbs /rearm
- Reboot your PC
Now you’ve got 30 more days.
Scenario 3: You’re configuring multiple PCs to use a KMS server
Steps:
- Set KMS server: slmgr.vbs /skms
- Activate: slmgr.vbs /ato
- Check status: slmgr.vbs /dlv
Useful SLMGR Variations
Some additional switches worth knowing:
| Command | Description |
| /rilc | Installs all license files |
| /xpr | Shows if Windows is permanently activated |
| /sai <interval> | Sets KMS activation interval (mins) |
| /sri <interval> | Sets renewal interval for KMS (mins) |
Troubleshooting with SLMGR
If you run into errors with activation, here’s how to start diagnosing them:
- Run: slmgr.vbs /dlv to see the error code
- Search Microsoft’s documentation for the specific code
- Use /upk, /ipk, and /ato in combination to retry activation
- Check your internet connection or KMS server availability
Wrapping It Up
SLMGR might sound intimidating, but once you know the right commands, it becomes an incredibly powerful tool. Whether you’re fixing a licensing issue, changing product keys, or managing activations across your office, SLMGR can do the heavy lifting without needing third-party tools.
Just remember: use the commands carefully, especially those that remove or rearm licenses.
READ NEXT:





