View Activation, License, and Expiration Date Information: SLMGR - Vbs /dli
View Activation, License, and Expiration Date Information: SLMGR - Vbs /dli
View Activation, License, and Expiration Date Information: SLMGR - Vbs /dli
Information
To display very basic license and activation information about the current system, run the
following command. This command tells you the edition of Windows, part of the product key
so you can identify it, and whether the system is activated.
slmgr.vbs /dli
To display more detailed license information–including the activation ID, installation ID, and
other details–run the following command:
slmgr.vbs /dlv
slmgr.vbs /xpr
If you installed Windows from a retail license and would like to use that license on another
computer, this allows you to remove the license. It could also be useful if you’re giving that
computer away to someone else. However, most Windows licenses are tied to the computer
they came with–unless you purchased a boxed copy.
To remove uninstall the current product key, run the following command and then restart your
computer:
slmgr.vbs /upk
Windows also stores the product key in the registry, as it’s sometimes necessary for the key to
be in the registry when setting up the computer. If you’ve uninstalled the product key,
you should run the below command to ensure it’s removed from the registry as well. This will
ensure people who use the computer in the future can’t grab the product key.
Running this command alone won’t uninstall your product key. It’ll remove it from the
registry so programs can’t access it from there, but your Windows system will remain licensed
unless you run the above command to actually uninstall the product key. This option is really
designed to prevent the key from being stolen by malware, if malware running on the current
system gains access to the registry.
slmgr.vbs /cpky
Run the following command to replace the product key, replacing #####-#####-#####-
#####-##### with the product key. The command will check the product key you enter to
ensure it’s valid before using it. Microsoft advises you restart the computer after running this
command.
You can also change your product key from the Activation screen in the Settings app, but this
command lets you do it from the command line.
slmgr.vbs /ato
slmgr.vbs /dti
You’ll now need to get a a confirmation ID you can use to activate the system over the phone.
Call the Microsoft Product Activation Center, provide the installation ID you received above,
and you’ll be given an activation ID if everything checks out. This allows you to activate
Windows systems without Internet connections.
To enter the confirmation ID you’ve received for offline activation, run the following
command. Replace “ACTIVATIONID” with the activation ID you’ve received.
Once you’re done, you can use the slmgr.vbs /dli or slmgr.vbs /dlv commands to
confirm you’re activated.
This can generally be done from the Activation screen in the Settings app if your PC isn’t
activated–you don’t have to use the command if you’d rather use the graphical interface.
Some Windows systems provide a limited time where you can use them as free trials before
entering a product key. For example, Windows 7 offers a 30-day trial period before it begins
complaining at you. To extend this trial period and reset it back to 30 days remaining, you can
use the following command.As Microsoft’s documentation puts it, this command “resets the
activation timers.”
This command can only be used several times, so you can’t indefinitely extend the trial. The
number of time it can be used depends on the “rearm count,” which you can view using the
slmgr.vbs /dlv command. It seems different on different versions of Windows–it was three
times on Windows 7, and it seems to be five times on Windows Server 2008 R2.
This no longer seems to work on Windows 10, which is very lenient if you don’t provide it a
product key anyway. This option still works on older versions of Windows and may continue
to work on other editions of Windows, such as Windows Server, in the future.
slmgr.vbs /rearm
slmgr.vbs /option
slmgr.vbs computername username password /option
The Slmgr.vbs command has other options, which are useful for dealing with KMS activation
and token-based activation. Consult Microsoft’s Slmgr.vbs documentation for more details.