Zoomtutorials
  • Tutorials
    • DevOps
      • Terraform
      • Git
      • GitHub
      • Jenkins
      • Docker
      • Kubernetes
      • Ansible
      • Python
      • Azure DevOps
      • AWS DevOps
      • Monitoring
    • Cloud
      • AWS
      • Azure
      • GCP
      • Oracle Cloud
      • Alibaba Cloud
      • IBM Cloud
      • DigitalOcean
      • Linode
    • Microsoft Dynamics ERP
      • Dynamics 365
        • D365 FnO
        • D365 BC
      • Dynamics AX
      • Dynamics NAV
      • Dynamics GP
      • Dynamics CRM
    • Azure DevOps
      • Azure Boards
      • Azure Repos
      • Azure Pipelines
      • Azure Test Plans
      • Azure Artifacts
      • Extensions Marketplace
    • AWS DevOps
      • CodeStar
      • CodeCommit
      • CodeBuild
      • CodeDeploy
      • CodePipeline
      • CodeArtifact
    • Web Server
      • IIS
      • Apache
      • NGINX
      • Tomcat
      • NodeJS
    • Microsoft
      • Office 365
      • Microsoft 365
      • SharePoint
      • MS Dynamics ERP
  • Development
    • Application
      • Magento 2
      • Magento
      • WordPress
      • PHP
      • .Net
      • .Net Core
      • NodeJS
      • JAVA
    • Database
      • Microsoft SQL Server
      • MySQL
      • MariaDB
      • Amazon Aurora
      • SQL Proxy
  • HowTos
    • Linux OS
      • RHEL
      • Ubuntu
      • CentOS
      • Fedora
      • Debian
    • Linux Tips
      • Linux Commands
      • Linux Tricks
      • Linux Cheatsheet
    • Windows OS
      • Server 2019
      • Server 2016
      • Server 2012
      • Server 2008
      • Windows 11
      • Windows 10
      • Windows 8
      • Windows 7
    • Windows Tips
      • Windows Commands
      • Windows Shortcuts
  • Tools
    • Monitoring
      • New Relic
      • ELK Stack
      • Loggly
      • DataDog
      • Papertrial
      • Graylog
      • UptimeRobot
    • Security
      • Firewall
      • Internet Security
      • Antivirus
    • Backup
      • SQL Backup
      • Iperius Backup
  • Courses
  • News
  • Submit Tutorials
  • More…
    • Services
    • Write For Us
    • Hire Us
    • Community
    • Donate ❤️
    • Contact Us
Facebook Twitter Instagram
Zoomtutorials
  • Tutorials
    • DevOps
      • Terraform
      • Git
      • GitHub
      • Jenkins
      • Docker
      • Kubernetes
      • Ansible
      • Python
      • Azure DevOps
      • AWS DevOps
      • Monitoring
    • Cloud
      • AWS
      • Azure
      • GCP
      • Oracle Cloud
      • Alibaba Cloud
      • IBM Cloud
      • DigitalOcean
      • Linode
    • Microsoft Dynamics ERP
      • Dynamics 365
        • D365 FnO
        • D365 BC
      • Dynamics AX
      • Dynamics NAV
      • Dynamics GP
      • Dynamics CRM
    • Azure DevOps
      • Azure Boards
      • Azure Repos
      • Azure Pipelines
      • Azure Test Plans
      • Azure Artifacts
      • Extensions Marketplace
    • AWS DevOps
      • CodeStar
      • CodeCommit
      • CodeBuild
      • CodeDeploy
      • CodePipeline
      • CodeArtifact
    • Web Server
      • IIS
      • Apache
      • NGINX
      • Tomcat
      • NodeJS
    • Microsoft
      • Office 365
      • Microsoft 365
      • SharePoint
      • MS Dynamics ERP
  • Development
    • Application
      • Magento 2
      • Magento
      • WordPress
      • PHP
      • .Net
      • .Net Core
      • NodeJS
      • JAVA
    • Database
      • Microsoft SQL Server
      • MySQL
      • MariaDB
      • Amazon Aurora
      • SQL Proxy
  • HowTos
    • Linux OS
      • RHEL
      • Ubuntu
      • CentOS
      • Fedora
      • Debian
    • Linux Tips
      • Linux Commands
      • Linux Tricks
      • Linux Cheatsheet
    • Windows OS
      • Server 2019
      • Server 2016
      • Server 2012
      • Server 2008
      • Windows 11
      • Windows 10
      • Windows 8
      • Windows 7
    • Windows Tips
      • Windows Commands
      • Windows Shortcuts
  • Tools
    • Monitoring
      • New Relic
      • ELK Stack
      • Loggly
      • DataDog
      • Papertrial
      • Graylog
      • UptimeRobot
    • Security
      • Firewall
      • Internet Security
      • Antivirus
    • Backup
      • SQL Backup
      • Iperius Backup
  • Courses
  • News
  • Submit Tutorials
  • More…
    • Services
    • Write For Us
    • Hire Us
    • Community
    • Donate ❤️
    • Contact Us
Facebook Twitter Instagram YouTube LinkedIn
Zoomtutorials
Home»Tutorials»Microsoft»Windows»How to Use the slmgr Command in Windows
Windows

How to Use the slmgr Command in Windows

Choudhury SBy Choudhury SAugust 27, 2021No Comments5 Mins Read
Facebook Twitter Pinterest LinkedIn Tumblr Email
Share
Facebook Twitter LinkedIn Pinterest Email

Software Licensing Management Tool (slmgr) is a CLI in Windows which is used to perform advanced Windows activation tasks.

Slmgr Uses

Slmgr is used to activate Windows or change the product key if the normal activation process fails or if the normal activation process throws “Windows is not genuine” errors.

How to user Slmgr Commands

The Slmgr commands are used in a Windows command prompt. Please open the command prompt as an administrator using below process.

Click on Search > type ‘cmd’ > Right Click on ‘Command Prompt’

image 1 - How to Use the slmgr Command in Windows

Note: Slmgr.vbs is used only for the Windows operating system. Ospp.vbs manages volume licensing for Microsoft Office products.

Common Slmgr Commands and its uses

CHECK ACTIVATION STATUS

slmgr /xpr

Use this slmgr command to see if Windows is activated. You’ll see a message that says Windows is activated if it is, or be given a date if it’s not permanently activated, or see an error if no product key has been provided.

Note: A regular Command Prompt can work for some of these tasks but others—ones that involve changing data and not just displaying it—require an elevated Command Prompt.

VIEW CURRENT LICENSE INFO

slmgr /dli

With this slmgr command, you’ll see part of the product key being used on your computer and an indication of whether the license is active. Other details are included here, too, like the KMS machine IP address, activation renewal interval, and other Key Management Services (KMS) information.

DETAILED LICENSE INFO

slmgr /dlv

This command for slmgr.vbs reveals a lot more information about your computer. It starts off with the Windows version number and follows with the activation ID, extended PID, installation ID, remaining Windows rearm and SKU count, and a few other details on top of what the /dli option shows.

RESET ACTIVATION TIMERS

slmgr /rearm

The rearm command resets activation timers, which essentially lets you use Windows without activating it by extending the trial. For example, if you’re using Windows on a 30-day trial, this one-month limitation can be reset back to the beginning after entering this slmgr command.

A restart of your computer is required to complete this command.

Note: There’s a limit to how many times you can rearm the Windows activation files. Check the rearm count with the /dlv command above to see how many cycles are left.

DELETE WINDOWS PRODUCT KEY

slmgr /cpky

Use this slmgr command to remove the product key from Windows Registry. Doing this will not delete the key from your computer or un-activate Windows, but it will prevent key finder programs and malicious tools from being able to retrieve the key.

ACTIVATE WINDOWS ONLINE

slmgr /ato

This slmgr command forces Windows to try online activation, which is useful if you attempted normal activation steps (not using Slmgr.vbs) but received a connection problem or similar error.

CHANGE WINDOWS PRODUCT KEY

slmgr /ipk 12345-12345-12345-12345-12345

Change the Windows product key with this slmgr command. Replace those numbers with the real product key, but be sure to include the dashes. Restart the computer to fully apply the new key.

If the key isn’t correct, you’ll see a message that The Software Licensing Service reported that the product key is invalid.

CHANGE REMOTE PRODUCT KEY

slmgr /ipk mattpc Safi [email protected] 12345-12345-12345-12345-12345

This command is the exact same as the slmgr /ipk command shown above but instead of executing the change product key request on the local computer, it’s performed on the machine named mattpc with the Matt admin users’ login credentials.

DEACTIVATE WINDOWS

slmgr /upk

A fitting last example for the slmgr command in Windows is this one, which will uninstall the product key from the local computer. Just reboot your computer after you see the Uninstalled product key successfully message.

Apart from the above, there are other Slmgr CLI which can be used to perform advanced functions. Below is a compilation of all the useful CLI commands for Slmgr. Please have a look at the slmgr command syntax and the other supported options:

slmgr [MachineName [username [password]]] [option]

Slmgr Command Options

ItemExplanation
MachineNameThe machine to administer. Defaults to the local machine if omitted.
usernameThe username of an administrator account on the remote machine.
passwordThe password for username.
/atoActivate Windows license and product key against Microsoft’s server.
/atp Confirmation_IDActivate the product with a user-provided Confirmation_ID. 
/cdnsDisable DNS publishing by the KMS host.
/ckhcDisable KMS host caching.
/ckmsClear the name of KMS server used to default and port to default.
/cpkyDelete the Windows product key from Windows Registry.
/cpriSet the KMS priority to low.
/dliDisplay the current license information with activation status and partial product key.
/dlvDisplay additional license information. Similar to /dli but more detailed.
/dtiDisplay Installation ID for offline activation.
/ipk keyChange the Windows product key. Replaces the current product key if present.
/ilc fileInstall a license file.
/rilc Reinstall system license files.
/rearmReset the evaluation period/licensing status and activation state of the computer. Use /rearm-app to specify an app, or /rearm-sku for a specific sku.
/skmsSet the Volume Licensing KMS server and/or the port used for KMS activation.
/skhcEnable KMS host caching (enabled by default). This blocks the use of DNS priority and weight after the initial discovery of a working KMS host.
/sai intervalSets the interval in minutes for unactivated clients to attempt KMS connection.
/spriSet the KMS priority to normal (default).
/sprt portSet the port on which the KMS host listens for client activation requests (default TCP port is 1688).
/sdnsEnable DNS publishing by the KMS host (default).
/upkUninstall the currently installed Windows product key and return the license status back to a trial state.
/xprShow the expiry date of the current license or indicate whether activation is permanent.

Note: The MachineName option can’t be used across platforms. For example, you can’t manage Windows activation on a Windows 7 computer from a Windows 10 computer.

That’s all folks. Thanks for reading. Have a great day…!

 

slmgr-commands
Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
Choudhury S
  • Website

Choudhury is the founder and chief editor of ZoomTutorials Blog, a leading tutorials and technology blogging site specializing in DevOps, SysAdmin and Cloud Technologies to help IT professionals in their day to day work. He is a Senior Cloud and DevOps Solutions Engineer at a leading eCommerce development Company and has more than 10+ years of Cloud, DevOps and SysAdmin experience working with Fortune 500 companies to solve their most important IT backbones. He lives in Hyderabad with his wife and a son.

Related Posts

How To Extend Windows Server Evaluation after Trial Period Expiry

August 26, 2021

How to backup Microsoft Exchange Server

July 22, 2019

Resize Azure Virtual Machine from Azure Dashboard

August 12, 2018
0 0 votes
Article Rating
Subscribe
Notify of
guest
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments

Buy Me a Coffee Plz...

Get our latest tutorials
Recent Posts
  • How to Use the slmgr Command in Windows
  • How To Extend Windows Server Evaluation after Trial Period Expiry
  • List of Useful Magento 2 Commands
  • Magento 2 Commands and the Use Cases
  • MySQL and MariaDB Performance Tuning and Optimization
  • Microsoft Dynamics AX End of Support/Life
  • Magento Community read/write splitting with Database Proxy
  • Git Commands for developers and sysadmins
  • Install the git credential-oskeychain
  • Install Git on Windows, Linux and Mac
August 2022
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
293031  
« Aug    
Archives
Facebook Twitter Instagram YouTube LinkedIn
  • Donation ❤️
  • About
  • Services
  • Submit Tutorials
  • Contact Us
  • Privacy Policy
  • Terms of Use
Copyright © 2017- 2022 by ZT Group India Private Limited. All Rights Reserved. Designed with ❤️ by CloudSols.com

Type above and press Enter to search. Press Esc to cancel.

wpDiscuz