Slmgr command, how to use it in Windows?

Deepak Gupta January 15, 2022
Updated 2022/01/15 at 9:15 AM

Within the system commands provided by Windows we have the slmgr command. This command us displays the details associated with the activation key used to activate the operating system. Slmgr is the tool used to manage Windows software licenses. Within the slmgr component, we can manage the activation of the system and the keys and certificates of the different software that we use. However, the slmgr command can be used for many more options. If you want to discover why and how to use the slmgr command in Windows operating systems, we will tell you about it in the following article.

Table of Contents


What is the slmgr command?

Slmgr is more than a command, in fact it can be categorized as a Windows Script Host. This means that slmgr is actually a script string in VBScript language that are interpreted by the Windows script execution engine and environment.

This environment has functionalities comparable to bash batch file processing. The difference lies in the fact that it has a greater variety of languages ​​with interpretation possibilities. Windows script host is built into Windows 98, Windows 2000, Windows Me, Windows XP, Windows Server 2003, Windows Vista, Windows 7, Windows 8, Windows 10, and Windows 11 versions. It is also installed by default in the web browser. Internet Explorer 5.

What is the use of the slmgr command?

The slmgr command is used to manage issues related to the Windows license. In addition, it can be used for the same purpose, but on the certificates of programs installed on the system.

With the slmgr command we can activate Windows by providing a valid license, or extract the license key that is already in use. This last feature is very valuable if we want, for example, to migrate the operating system to another computer. This is very useful, since sometimes, when we migrate the system, it does not activate with the license that we already had. In this case, it’s time to use the slmgr command to extract the license from the old system and use it for the migration.

slmgr command syntax

The slmgr command has many features, depending on the parameters used. The general syntax is slmgr [<opciones>]. Actually, the command call can be done in many ways. For example, we can use slmgr -ipk where –ipk is a parameter. Other variants of this same call are slmgr.vbs -ipk, slmgr.vbs /ipk, slmgr /ipk. Either way, the command will be executed.

To use the command we first access a terminal with administration privileges (some options do not require this privilege but in this way we cover the whole set). For this we write CMD in the start menu and select the option execute as an administrator. The example is done on Windows 10.

Access the CMD in administrator mode.

Basic parameters and use of the slmgr command

There are many parameters that provide different options when executing the command. It is valid to clarify that the command can be applied to remote computers. For this, you only have to include the name of the remote computer, the username and the password, in addition to the parameters that are going to be used. In this way the syntax would be:

slmgr.vbs [<NombreEquipo> [<Usuario> <Contraseña>]] [<Opciones>]

These would be the most basic parameters of the slmgr command. Since the parameters are many, we have classified them into different groups. Only the options associated with the command of a local team, not from remote computers. In addition, the options described in this article are for uses offline.

Global parameters of the slmgr command

These are parameters used in global functions of the operating system. It is focused on options directed towards the activation key of the version of the operating system that is being used.

/ipk

It is used for install a product key. The system is responsible for confirming that the key provided is valid and appropriate to the version of the system in use. If not, an error is issued.

-ipk option of the slmgr command
-ipk option of the slmgr command

If the key is valid, it will install or replace the existing key without providing any message. Necessary reboot the system for the change to take effect.

/ate [<Id. de activación>]

It is used to ask the system to complete the online activation process whether the system has a KMS key or a MAC key installed.

If a GVLK generic volume license exists, this parameter requests a KMS license. As of Windows use this parameter is not used. Instead use the parameter –act-type.

/dli [<Id. de activación> | All]

This parameter displays the information of the current installed license. If we use the parameter id activation, system information with that identifier is displayed. In case of using All, the license of all installed products is displayed.

-dli option of the slmgr command
-dli option of the slmgr command.

/dlv [<Id. de activación> | All]

Used to display more license details. Like the previous option, we can specify a product identifier or use the parameter All to see all products.

-dlv option of the slmgr command
-dlv option of the slmgr command.

/xpr [<Id. de activación>]

Shows the date the current license expires. It is very useful for people with activation KMS, since business licenses and MAK They are in perpetuity.

Advanced Options of the slmgr Command

Are you oroptions are more advanced and are used from advanced settings and registry settings that require a system license.

/cpky

In case the system key is used in the Windows registry, this option removes it from the registry. This helps prevent third parties from misappropriating your activation key. This option is required for key installations where the default setting is not to delete them from the registry.

/ilc

Is used to install a license file which is specified in the parameter. Such licenses are installed for troubleshooting or completion of token activation or manual installation.

/rilc

Causes all valid licenses that have been used on the system to be reinstalled. These copies of the licenses are stored in %SystemRoot%system32oem Y %SystemRoot%System32spptokens.

/rearm

Resets the timers associated with the activation. In case the registry key HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsNTCurrentVersionSoftwareProtectionPlatformSkipRearm has been established in 1, this parameter does not perform any action.

/rearm-app

Reset license status of the application specified with the Id parameter.

/upk [<Id. de aplicación>]

with this option we uninstall the current license of the Windows operating system. Once we restart the computer, the system will be in a non-activated state. If you specify an ID, the license for this specific product will be uninstalled.

/dti [<Id. de activación>]“

The identifier corresponding to the installation is shown, for its activation offline.

-dti option.
-dti option of the slmgr command.

slmgr command options for token-based activations

These options apply to token-based Windows system activations.

/lil

All current token-based licenses in the system are displayed.

/ril

Removes an installed token-based activation license.

/stao

It is used for set that only token-based activations are accepted. KMS activations are automatically disabled. It is not available in versions of Windows Server 2012 R2 and Windows 8.1. Instead of this option, use /acttype.

/ctao

Removes the default action of only accepting token-based activations. It automatically sets the kms activation.

/ltc

Give a list of possible valid certificates token-based that can be used to activate installed software.

/fta [<PIN>]

Is used for force token based activation from the indicated certificate. Parameter PIN it is optional and will only be used if a hardware medium is used to protect the certificate, such as a smart card.


Share this Article
Leave a comment

Leave a Reply

Your email address will not be published.