slmgr.vbs
Install, activate, and manage Windows licenses. tldr-pages
On Windows
Windows
Install, activate, and manage Windows licenses. Use cscript to run this program as a CLI, or wscript as a GUI. Note: This command may override, deactivate, and/or remove your current Windows license, so please proceed cautiously.
display the current Windows license information
cscript slmgr.vbs /dliIdentifyTrips 1 Sigma rule: mediumWSF/JSE/JS/VBA/VBE File Execution Via Cscript/Wscript by Michael Haag
display the installation iD for the current device. Useful for offline license activation
cscript slmgr.vbs /dtiIdentify/dStarts the debugger. Windows commands reference/tSpecifies the maximum time the script can run (in seconds). Windows commands reference/iSpecifies interactive mode, which displays alerts, scripting errors, and input prompts. Windows commands referenceTrips 1 Sigma rule: mediumWSF/JSE/JS/VBA/VBE File Execution Via Cscript/Wscript by Michael Haag
Display the current license's expiration date and time
cscript slmgr.vbs /xprIdentifyTrips 1 Sigma rule: mediumWSF/JSE/JS/VBA/VBE File Execution Via Cscript/Wscript by Michael Haag
install a new Windows license product key. Requires Administrator privileges and will override the existing license
cscript slmgr.vbs /ipk product_keyIdentifyTrips 1 Sigma rule: mediumWSF/JSE/JS/VBA/VBE File Execution Via Cscript/Wscript by Michael Haag
activate the Windows product license online. Requires Administrator privileges to do so
cscript slmgr.vbs /atoIdentifyTrips 1 Sigma rule: mediumWSF/JSE/JS/VBA/VBE File Execution Via Cscript/Wscript by Michael Haag
activate the Windows product license offline. Requires Administrator privileges and a Confirmation ID provided by Microsoft Product Activation Center
cscript slmgr.vbs /atp confirmation_idIdentifyTrips 1 Sigma rule: mediumWSF/JSE/JS/VBA/VBE File Execution Via Cscript/Wscript by Michael Haag
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
cscript slmgr.vbs /cpkyIdentifyTrips 1 Sigma rule: mediumWSF/JSE/JS/VBA/VBE File Execution Via Cscript/Wscript by Michael Haag
uninstall the current license (by its product key)
cscript slmgr.vbs /upkIdentifyTrips 1 Sigma rule: mediumWSF/JSE/JS/VBA/VBE File Execution Via Cscript/Wscript by Michael Haag