Last Updated on August 11, 2025 by Arnav Sharma
Microsoft’s command-line licensing tool is slmgr.vbs. The name actually stands for Windows Software Licensing Management Tool. SLMgr script allows users to query the current installation and see details about Windows 7/8 installation and its activation and licensing status.
Most of the licensing operating in Windows 8 can be done via a graphical user interface. If you’re a power user, you can access all options, flags and settings of the slmgr.vbs command script. To run the script, log on with a user account with administrator rights, and open an elevated Command Prompt window.
Options in SLMGR :
1. slmgr -dli (display the current license information)
2. slmgr -dlv (stands for display license information, similar to -dli switch but with more information)
3. slmgr -ipk xxxxx-xxxxx-xxxxx-xxxxx-xxxxx (enter a new or replace the current product key with the new product key supplied at xxxxx-xxxxx-xxxxx-xxxxx-xxxxx)
4. slmgr -xpr (shows expiration date)
5. slmgr -ato (activate Windows 8 license and product key against Microsoft’s server)
6. slmgr -skms activationservername:port (set the KMS server and the port used for KMS Activation)
7. slmgr -upk (uninstall current installed product key and return license status back to trial state)
8. slmgr -rearm (reset the licensing status and activation state of the machine)
9. slmgr -ckms (clear the name of KMS server used to default and port to default)
I help organisations secure their cloud infrastructure and stay ahead of evolving cyber threats. Microsoft MVP and Certified Trainer, author of Mastering Azure Security, and founder of arnav.au — a platform for practical Cloud, Cybersecurity, DevOps and AI content.
Frequently Asked Questions
SLMGR stands for Windows Software Licensing Management Tool and is Microsoft's command-line licensing tool. It allows users to query their Windows installation and view details about activation and licensing status, making it essential for managing Windows licenses and product keys.
To run SLMGR commands, you must log on with a user account that has administrator rights and open an elevated Command Prompt window. This ensures you have the necessary permissions to execute licensing management tasks.
You can activate Windows using the command 'slmgr -ato', which activates your Windows license and product key against Microsoft's server. This command verifies your license with Microsoft and completes the activation process.
Both commands display license information, but 'slmgr -dlv' provides more detailed information compared to 'slmgr -dli'. Use -dlv when you need comprehensive licensing details about your Windows installation.
Use the command 'slmgr -ipk xxxxx-xxxxx-xxxxx-xxxxx-xxxxx' to enter a new product key or replace your current one, substituting the x's with your actual product key. This command updates your Windows licensing with the new key you provide.