大网数据广告活动
Windows 命令与诊断

slmgr.vbs · Windows 命令

· 52CE 我爱测

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. > More information: <https://learn.microso

slmgr.vbs

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. More information: https://learn.microsoft.com/windows-server/get-started/activation-slmgr-vbs-options.

  • [d]isplay the current Windows [l]icense [i]nformation:

cscript slmgr.vbs /dli

  • [d]isplay the ins[t]allation [i]D for the current device. Useful for offline license activation:

cscript slmgr.vbs /dti

  • Display the current license's e[xp]i[r]ation date and time:

cscript slmgr.vbs /xpr

  • [i]nstall a new Windows license [p]roduct [k]ey. Requires Administrator privileges and will override the existing license:

cscript slmgr.vbs /ipk

  • [a]c[t]ivate the Windows product license [o]nline. Requires Administrator privileges to do so:

cscript slmgr.vbs /ato

  • [a]c[t]ivate the Windows [p]roduct license offline. Requires Administrator privileges and a Confirmation ID provided by Microsoft Product Activation Center:

cscript slmgr.vbs /atp

  • [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:

cscript slmgr.vbs /cpky

  • [u]ninstall the current license (by its [p]roduct [k]ey):

cscript slmgr.vbs /upk

来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。

资料来源与适用范围

资料来源
tldr-pages contributors
适用范围
请按文中版本与环境说明核对
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。