slmgr.vbs
Install, activate, and manage Windows licenses.
This command may override, deactivate, and/or remove your current Windows license. Please proceed with caution.
More information: https://learn.microsoft.com/windows-server/get-started/activation-slmgr-vbs-options.
- display the current Windows license information:
slmgr.vbs /dli
- display the installation iD for the current device. Useful for offline license activation:
slmgr.vbs /dti
- Display the current license’s expiration date and time:
slmgr.vbs /xpr
- install a new Windows license product key. Requires Administrator privileges and will override the existing license:
slmgr.vbs /ipk product_key
- activate the Windows product license online. Requires Administrator privileges to do so:
slmgr.vbs /ato
- activate the Windows product license offline. Requires Administrator privileges and an Confirmation ID provided by Microsoft Product Activation Center:
slmgr.vbs /atp confirmation_id
- clear the current license’s product key from the Windows Registry. This will not deactivate or uninstall the current license, but prevents the key from being stolen by malicious programs in the future:
slmgr.vbs /cpky
- uninstall the current license (by its product key):
slmgr.vbs /upk