
微软官方提供了一种通过密钥管理服务 (KMS) 来激活Windows及Office的批量授权服务,网上亦有多种激活教程来激活我们的Windows或者Office产品,基本也是通过更改系统KMS服务器地址,注入产品密钥来实现的,而这些服务器有时会离线,这时我们就可以通过Linux,Windows或者Dokcer自建KMS服务器来进行Windows和Office的激活。
Wind4 Github链接:https://github.com/Wind4/vlmcsd/releases
Dokcer安装KMS vlmcsd
Docker基于Alpine OS,从Wind4源码编译
https://github.com/mikolatero/docker-vlmcsd
docker run -d -p 1688:1688 --restart=always --name vlmcsd mikolatero/vlmcsd注:KMS激活所需的服务器映射到公网,并开放默认端口1688,及对应的域名或IP地址在此处不作说明。
激活Windows
命令行工具或PowerShell以管理员身份运行
slmgr.vbs -upk //卸载原密钥
slmgr.vbs -ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX //安装新序列号,参考下面GVLK
slmgr.vbs -skms srv.icstudio.cn //服务器IP或对应域名(本人搭建的KMS服务,可更改位自己搭建的服务器)
slmgr.vbs -ato //激活
slmgr.vbs -dlv //查看激活详情
slmgr.vbs -xpr //查看激活有效期
slmgr.vbs -dli //查看激活渠道激活Office
各个版本Office安装路径不同,默认为磁盘C,根据自己情况输入,最简单的就是哪个文件夹有ospp.vbs,就在哪里操作。
32位软件路径是C:\Program Files (x86)\,64位软件路径是C:\Program Files\
下面以Office 2019 64位软件举例,管理员身份运行CMD。
# 打开Office安装目录
cd \Program Files\Microsoft Office\Office16
# 查看证书
cscript ospp.vbs /dstatus
#联网激活
cscript ospp.vbs /act
# 安装密钥 用对应版本的激活码替换XXXXX ,不要无脑复制粘贴哦
cscript ospp.vbs /inpkey:NMMKJ-6RK4F-KMJVX-8D9MJ-6MWKP
# 卸载密钥
cscript ospp.vbs /unpkey:NMMKJ-6RK4F-KMJVX-8D9MJ-6MWKP
# 显示安装ID
cscript ospp.vbs /dinstid
# 输入确认ID [id]为你自己的确认Id
cscript ospp.vbs /actcid:[id]
# 设定KMS服务器
cscript ospp.vbs /sethst:IP or DOMAIN
# 联网激活
cscript ospp.vbs /act
Office x86
cd \Program Files (x86)\Microsoft Office\Office16
cscript ospp.vbs /sethst:IP or DOMAIN
cscript ospp.vbs /inpkey:xxxxx-xxxxx-xxxxx-xxxxx-xxxxx
cscript ospp.vbs /act
cscript ospp.vbs /dstatusall
Office x86_64
cd \Program Files\Microsoft Office\Office16
cscript ospp.vbs /sethst:IP or DOMAIN
cscript ospp.vbs /inpkey:xxxxx-xxxxx-xxxxx-xxxxx-xxxxx
cscript ospp.vbs /act
cscript ospp.vbs /dstatusall微软官方GVLK(部分)
更多微软官方GVLK:https://docs.microsoft.com/zh-cn/windows-server/get-started/kms-client-activation-keys
附上本人搭建的KMS服务器地址:srv.icstudio.cn
附上两枚MAK通道密钥(仅适用于**Windows10/11 专业版**)
VVVFH-MPBQT-KBX27-8XB4M-XWV3P(过期)
796WN-2F4DP-VX6XC-3DPCF-PPM93(过期)