乐趣区

搭建本地kmS服务器激活windows-office

准备

1.windows 或 linux 主机或需拟机一台(假如 ip 192.168.1.1)2. 在主机安装 python 环境
3.git clone https://github.com/SystemRage/py-kms.git

运行 kms 服务器

1. 在准备中的服务器上进入 clone 或下载的 py-kmy 目录
2. 确认准备的 kms 服务器 ip 和需要激活的机器是否在一个网段或者通过 ip 能够互通(假如 ip 192.168.1.2)3. 执行 python pykms_Server.py  [IPADDRESS] [PORT] 启动 kms server(python 没有加入环境变量的需要补全 python 的执行路径 默认 IPADDRESS 为“0.0.0.0”(所有接口),默认 PORT 为“1688”。)
4. 在 client 执行 telnet 192.168.1.1 1688 看是否能连通(此非必需)5. 在 微软查找对应的 kms 密钥 https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/jj612867(v=ws.11)

激活

1. 管理员在 192.168.1.2 打开 cmd 
2. slmgr /upk  卸载原密钥 
3. slmgr /ipk 密钥(安装上面第五步查到的对应密钥)4. slmgr /skms 192.168.1.1:1688(连接上面启动的 kms server)5. slmgr /ato(激活)6. slmgr /xpr (显示激活时间 为 180 天以后到期,到期时 运行一下 kms server 然后执行  激活里面的 4,5,6 部份又可以继续 180 天)    
退出移动版