2023-07-16 06:31:34 +01:00
# slmgr.vbs
> Install, activate, and manage Windows licenses.
> This command may override, deactivate, and/or remove your current Windows license. Please proceed with caution.
2023-10-25 13:18:55 +01:00
> More information: <https://learn.microsoft.com/windows-server/get-started/activation-slmgr-vbs-options>.
2023-07-16 06:31:34 +01:00
- [d]isplay the current Windows [l]icense [i]nformation:
2023-12-02 04:53:50 +00:00
`slmgr.vbs /dli`
2023-07-16 06:31:34 +01:00
- [d]isplay the ins[t]allation [i]D for the current device. Useful for offline license activation:
2023-12-02 04:53:50 +00:00
`slmgr.vbs /dti`
2023-07-16 06:31:34 +01:00
- Display the current license's e[xp]i[r]ation date and time:
2023-12-02 04:53:50 +00:00
`slmgr.vbs /xpr`
2023-07-16 06:31:34 +01:00
- [i]nstall a new Windows license [p]roduct [k]ey. Requires Administrator privileges and will override the existing license:
2023-12-02 04:53:50 +00:00
`slmgr.vbs /ipk {{product_key}}`
2023-07-16 06:31:34 +01:00
- [a]c[t]ivate the Windows product license [o]nline. Requires Administrator privileges to do so:
2023-12-02 04:53:50 +00:00
`slmgr.vbs /ato`
2023-07-16 06:31:34 +01:00
- [a]c[t]ivate the Windows [p]roduct license offline. Requires Administrator privileges and an Confirmation ID provided by Microsoft Product Activation Center:
2023-12-02 04:53:50 +00:00
`slmgr.vbs /atp {{confirmation_id}}`
2023-07-16 06:31:34 +01:00
- [c]lear the current license's [p]roduct [k]e[y] 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:
2023-12-02 04:53:50 +00:00
`slmgr.vbs /cpky`
2023-07-16 06:31:34 +01:00
- [u]ninstall the current license (by its [p]roduct [k]ey):
2023-12-02 04:53:50 +00:00
`slmgr.vbs /upk`