kms.jpg

微软官方提供了一种通过密钥管理服务 (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(部分)

操作系统类型

操作系统版本

KMS客户端产品密钥

Windows Server

(LTSC 版本)

Windows Server 2022 Datacenter

WX4NM-KYWYW-QJJR4-XV3QB-6VM33

Windows Server 2022 Standard

VDYBN-27WPP-V4HQT-9VMD4-VMK7H

Windows Server

(半年频道版本)

Windows Server Datacenter

6NMRW-2C8FM-D24W7-TQWMY-CWH2D

Windows Server Standard

N2KJX-J94YW-TQVFB-DG9YT-724CC

Windows 11/10

(半年频道版本)

Windows 11/10专业版

W269N-WFGWX-YVC9B-4J6C9-T83GX

Office产品名称

KMS ClientID

GVLK

Office 2019 Professional Plus

85dd8b5f-eaa4-4af3-a628-cce9e77c9a03

NMMKJ-6RK4F-KMJVX-8D9MJ-6MWKP

Office 2019 Standard

6912a74b-a5fb-401a-bfdb-2e3ab46f4b02

6NWWJ-YQWMR-QKGCB-6TMB3-9D9HK

Word 2019

059834fe-a8ea-4bff-b67b-4d006b5447d3

PBX3G-NWMT6-Q7XBW-PYJGG-WXD33

Excel 2019

237854e9-79fc-4497-a0c1-a70969691c6b

TMJWT-YYNMB-3BKTF-644FC-RVXBD

PowerPoint 2019

3131fd61-5e4f-4308-8d6d-62be1987c92c

RRNCX-C64HY-W2MM7-MCH9G-TJHMQ

Outlook 2019

c8f8a301-19f5-4132-96ce-2de9d4adbd33

7HD7K-N4PVK-BHBCQ-YWQRW-XW4VK

更多微软官方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(过期)