KMS是什么?

KMS ,Key Management Service(Windows密钥管理服务)
KMS定位于仅提供企业域内的内部网络的激活服务,目的是抑制盗版,微软给企业提供电子ISO映像进行批量授权安装,企业内网搭建KMS服务器,内网中所有的Windows产品通过KMS服务定时激活,一般有效期是180天,当你离开公司内网,系统只能继续使用180天。

但是讽刺的是,开源界在世界各地 搭建了多个KMS私服,为广大用户提供免费的Windows产品激活服务。
详情:参考百度百科对KMS的解释

激活脚本范例

  1. 通过“管理员运行”命令提示符,可以执行以下命令用于KMS激活
  2. slmgr.vbs -upk #执行原有安装密钥的清除(若系统为未激活状态可以省略)
  3. slmgr /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX #安装对应版本的GVLK密钥
  4. slmgr /skms kms.domain.com #KMS服务器的域名或者内部IP
  5. slmgr /ato #执行KMS激活操作
  6. -- 详细脚本
  7. Windows
  8. slmgr.vbs -ipk W269N-WFGWX-YVC9B-4J6C9-T83GX
  9. slmgr.vbs -skms kms.library.hk
  10. slmgr.vbs -ato
  11. Office
  12. cd "C:\Program Files (x86)\Microsoft Office\Office16"
  13. cscript ospp.vbs /inpkey:XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99
  14. cscript ospp.vbs /sethst:kms.library.hk
  15. cscript ospp.vbs /act
  16. Office2016 KMS激活方法详解
  17. 1、管理员模式打开命令行,切换到Office安装路径(2015Office15)
  18. C:\Program Files\Microsoft Office\Office16
  19. (32-bit系统+32-bit Office 2013/2016,或者64-bit系统+64-bitOffice 2013/2016)
  20. C:\Program Files(x86)\Microsoft Office\Office16
  21. (2015Office15, 64-bit系统+32-bit Office 2013/2016)
  22. 2、指定KMS服务器:
  23. cscript ospp.vbs /sethst: kms.library.hk
  24. 3、激活Office 2013/2016
  25. cscript ospp.vbs /act
  26. Office 2016 KMS卸载方法
  27. 管理员命令行输入:
  28. cscript "C:\Program Files\Microsoft Office\Office16\OSPP.VBS" /dstatus
  29. 如果显示有kms等字样,说明是KMS激活的,请继续以下步骤:
  30. cscript "C:\Program Files\Microsoft Office\Office16\OSPP.VBS" /unpkey:AB12C
  31. (AB12C 上面的KEY的最后5位)
  32. cscript "C:\Program Files\Microsoft Office\Office16\OSPP.VBS" /remhst
  33. 最后再用第一次的命令,查看及确认是否成功。
  34. cscript "C:\Program Files\Microsoft Office\Office16\OSPP.VBS" /dstatus
  35. 若没有显示KMS等字样,说明以上操作成功完成,现在可以输入新的KEY
  36. cscript "C:\Program Files\Microsoft Office\Office16\OSPP.VBS" /d/inpkey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
  37. (零售或VLKEY,请根据OFFICE版本选择)
  38. 或者,用第二条命令,把所有的KEY都卸载后,打开任意一OFFICE程序即可重输KEY/帐号
  39. [注]:若是office20132010请将后面的16改成1415,如果是64位系统安装32OFFICE,请将Program Files改成Program Files (x86)
  40. 更多帮助详见:
  41. cscript "C:\Program Files\Microsoft Office\Office16\OSPP.VBS" /?
  42. 支持以下软件
  43. WINDOWS
  44. WINDOWS 10,专业版,企业版。
  45. WINDOWS 8/8.1,专业版,企业版。
  46. WINDOWS 7,专业版,企业版。
  47. OFFICE
  48. OFFICE 2016Office Professional Plus 2016Office Standard 2016Project Professional 2016 Project Standard 2016Visio Professional 2016Visio Standard 2016Access 2016Excel 2016OneNote 2016Outlook 2016PowerPoint 2016 Publisher 2016Word 2016
  49. WINDOWS SERVER
  50. windows server 2016
  51. windows server 2012

可用KMS服务列表

  1. kms.loli.beer
  2. kms.loli.best
  3. kms2.loli.best
  4. kms.cangshui.net
  5. kms.iaini.net
  6. kms.ddz.red
  7. kms.ghpym.com
  8. kms.qkeke.com
  9. kms.wxlost.com
  10. kms.heng07.com
  11. kms8.MSGuides.com
  12. kms.kuretru.com
  13. kms.moeclub.org
  14. kms.ijio.net
  15. cy2617.jios.org
  16. home.aalook.com
  17. kms.bige0.com
  18. kms.jm33.me
  19. kms.zhuxiaole.org
  20. windows.kms.app
  21. nb.shenqw.win
  22. kms.magicwall.org
  23. 高校 KMS 主机地址(需要连接学习内网或vpn)
  24. 北京大学:kms.pku.edu.cn
  25. 清华大学:kms.cic.tsinghua.edu.cn
  26. 复旦大学:mvls.fudan.edu.cn
  27. 同济大学:kms.tongji.edu.cn
  28. 苏州大学:kms.suda.edu.cn
  29. 中山大学:kms.sysu.edu.cn
  30. 华东理工大学:kms.ecust.edu.cn
  31. 华北电力大学:202.204.74.218
  32. 华南理工大学:act.msweb.scut.edu.cn
  33. 南安普顿大学:kms.soton.ac.uk
  34. 上海交通大学:kms.sjtu.edu.cn
  35. 上海财经大学:kms.shufe.edu.cn
  36. 上海师范大学:mskms.shnu.edu.cn
  37. 上海海事大学:kms.shmtu.edu.cn
  38. 武汉理工大学:kms.whut.edu.cn
  39. 南京航空航天大学:kms.nuaa.edu.cn
  40. 上海第二工业大学:kms.sspu.edu.cn
  41. 中国科学技术大学:kms.ustc.edu.cn
  42. 南京特殊教育师范学院:kms.njty.edu.cn

现成的CMD脚本

下载后管理员权限运行即可KMS.Activation.CMD

脚本代码如下:

  1. @echo off
  2. setlocal EnableDelayedExpansion & cd /d "%~dp0"
  3. title KMS通用激活工具
  4. %1 %2
  5. ver|find "5.">nul&&goto :xptooff
  6. mshta vbscript:createobject("shell.application").shellexecute("%~s0","goto :start","","runas",1)(window.close)&goto :eof
  7. :start
  8. cls
  9. echo Windows Office 激活
  10. echo 正在检查与激活服务器的连接情况……
  11. echo.
  12. ping kms.library.hk | find "超时" > NUL && goto fail
  13. ping kms.library.hk | find "目标主机" > NUL && goto fail
  14. echo 成功连接上服务器,检查系统的激活情况,将自动跳过永久激活的系统。
  15. cscript //Nologo %windir%\system32\slmgr.vbs /xpr | find "已永久激活">NUL&&goto wintooff
  16. ver | find "6.0." > NUL && goto winvista
  17. ver | find "6.1." > NUL && goto win7
  18. ver | find "6.2." > NUL && goto win8
  19. ver | find "6.3." > NUL && goto win81
  20. ver | find "10.0." > NUL && goto win10
  21. echo 未找到合适的NT6系统,可能是WinXPWin2003
  22. goto office
  23. :winvista
  24. echo 当前为Windows Vista/2008
  25. set Business=YFKBB-PQJJV-G996G-VWGXY-2V3X8
  26. set BusinessN=HMBQG-8H2RH-C77VX-27R82-VMQBT
  27. set Enterprise=VKK3X-68KWM-X2YGT-QR4M6-4BWMV
  28. set EnterpriseN=VTC42-BM838-43QHV-84HX6-XJXKV
  29. set ServerWeb=WYR28-R7TFJ-3X2YQ-YCY4H-M249D
  30. set ServerStandard=TM24T-X9RMF-VWXK6-X8JC9-BFGM2
  31. set ServerStandardV=W7VD6-7JFBR-RX26B-YKQ3Y-6FFFJ
  32. set ServerEnterprise=YQGMW-MPWTJ-34KDK-48M3W-X4Q6V
  33. set ServerEnterpriseV=39BXF-X8Q23-P2WWT-38T2F-G3FPG
  34. set ServerWeb=RCTX3-KWVHP-BR6TB-RB6DM-6X7HP
  35. set ServerDatacenter=7M67G-PC374-GR742-YH8V4-TCBY3
  36. set ServerDatacenterV=22XQ2-VRXRG-P8D42-K34TD-G3QQC
  37. set ServerEnterpriseIA64=4DWFP-JF3DJ-B7DTH-78FJB-PDRHK
  38. goto windowsstart
  39. :win7
  40. echo 当前为Windows 7/2008 R2
  41. set Professional=FJ82H-XT6CR-J8D7P-XQJJ2-GPDD4
  42. set ProfessionalN=MRPKT-YTG23-K7D7T-X2JMM-QY7MG
  43. set ProfessionalE=W82YF-2Q76Y-63HXB-FGJG9-GF7QX
  44. set Enterprise=33PXH-7Y6KF-2VJC9-XBBR8-HVTHH
  45. set EnterpriseN=YDRBP-3D83W-TY26F-D46B2-XCKRJ
  46. set EnterpriseE=C29WB-22CC8-VJ326-GHFJW-H9DH4
  47. set ServerWeb=6TPJF-RBVHG-WBW2R-86QPH-6RTM4
  48. set ServerHPC=TT8MH-CG224-D3D7Q-498W2-9QCTX
  49. set ServerStandard=YC6KT-GKW9T-YTKYR-T4X34-R7VHC
  50. set ServerEnterprise=489J6-VHDMP-X63PK-3K798-CPX3Y
  51. set ServerDatacenter=74YFP-3QFB3-KQT8W-PMXWJ-7M648
  52. set ServerEnterpriseIA64=GT63C-RJFQ3-4GMB6-BRFB9-CB83V
  53. goto windowsstart
  54. :win8
  55. echo 当前为Windows 8/2012
  56. set Professional=NG4HW-VH26C-733KW-K6F98-J8CK4
  57. set ProfessionalN=XCVCF-2NXM9-723PB-MHCB7-2RYQQ
  58. set Core=BN3D2-R7TKB-3YPBD-8DRP2-27GG4
  59. set Enterprise=32JNW-9KQ84-P47T8-D8GGY-CWCK7
  60. set EnterpriseN=JMNMF-RHW7P-DMY6X-RF3DR-X2BQT
  61. set CoreN=8N2M2-HWPGY-7PGT9-HGDD8-GVGGY
  62. set CoreSingleLanguage=2WN2H-YGCQR-KFX6K-CD6TF-84YXQ
  63. set CoreCountrySpecific=4K36P-JN4VD-GDC6V-KDT89-DYFKP
  64. set ServerMultiPointPremium=XNH6W-2V9GX-RGJ4K-Y8X6F-QGJ2G
  65. set ServerMultiPointStandard=HM7DN-YVMH3-46JC3-XYTG7-CYQJJ
  66. set ServerStandard=XC9B7-NBPP2-83J2H-RHMBY-92BT4
  67. set ServerDatacenter=48HP8-DN98B-MYWDG-T2DCC-8W83P
  68. set ProfessionalWMC=GNBB8-YVD74-QJHX6-27H4K-8QHDG
  69. set CoreARM=DXHJF-N9KQX-MFPVR-GHGQK-Y7RKV
  70. goto windowsstart
  71. :win81
  72. echo 当前为Windows 8.1
  73. set Core=M9Q9P-WNJJT-6PXPY-DWX8H-6XWKK
  74. set CoreARM=XYTND-K6QKT-K2MRH-66RTM-43JKP
  75. set CoreCountrySpecific=NCTT7-2RGK8-WMHRF-RY7YQ-JTXG3
  76. set CoreN=7B9N3-D94CG-YTVHR-QBPX3-RJP64
  77. set CoreSingleLanguage=BB6NG-PQ82V-VRDPW-8XVD2-V8P66
  78. set EmbeddedIndustry=NMMPB-38DD4-R2823-62W8D-VXKJB
  79. set EmbeddedIndustryA=VHXM3-NR6FT-RY6RT-CK882-KW2CJ
  80. set EmbeddedIndustryE=FNFKF-PWTVT-9RC8H-32HB2-JB34X
  81. set Enterprise=MHF9N-XY6XB-WVXMC-BTDCT-MKKG7
  82. set EnterpriseN=TT4HM-HN7YT-62K67-RGRQJ-JFFXW
  83. set Professional=GCRJD-8NW9H-F2CDX-CCM8D-9D6T9
  84. set ProfessionalN=HMCNV-VVBFX-7HMBH-CTY9B-B4FXY
  85. set ProfessionalWMC=789NJ-TQK6T-6XTH8-J39CJ-J8D3P
  86. set ServerCloudStorageCore=3NPTF-33KPT-GGBPR-YX76B-39KDD
  87. set ServerCloudStorage=3NPTF-33KPT-GGBPR-YX76B-39KDD
  88. set ServerDatacenter=W3GGN-FT8W3-Y4M27-J84CP-Q3VJ9
  89. set ServerDatacenterCore=W3GGN-FT8W3-Y4M27-J84CP-Q3VJ9
  90. set ServerStandard=D2N9P-3P6X9-2R39C-7RTCD-MDVJX
  91. set ServerStandardCore=D2N9P-3P6X9-2R39C-7RTCD-MDVJX
  92. set ServerSolution=KNC87-3J2TX-XB4WP-VCPJV-M4FWM
  93. set ServerSolutionCore=KNC87-3J2TX-XB4WP-VCPJV-M4FWM
  94. goto windowsstart
  95. :win10
  96. echo 当前为Windows 10
  97. echo 尝试进行永久激活。
  98. cscript //Nologo %windir%\system32\slmgr.vbs /ipk VK7JG-NPHTM-C97JM-9MPGT-3V66T
  99. cscript //Nologo %windir%\system32\slmgr.vbs /ato | find "成功" > NUL && goto win10tooff
  100. cscript //Nologo %windir%\system32\slmgr.vbs /ipk QJNXR-YD97Q-K7WH4-RYWQ8-6MT6Y
  101. cscript //Nologo %windir%\system32\slmgr.vbs /ato | find "成功" > NUL && goto win10tooff
  102. set Core=TX9XD-98N7V-6WMQ6-BX7FG-H8Q99
  103. set CoreCountrySpecific=PVMJN-6DFY6-9CCP6-7BKTT-D3WVR
  104. set CoreN=3KHY7-WNT83-DGQKR-F7HPR-844BM
  105. set CoreSingleLanguage=7HNRX-D7KGG-3K4RQ-4WPJ4-YTDFH
  106. set Professional=W269N-WFGWX-YVC9B-4J6C9-T83GX
  107. set ProfessionalN=MH37W-N47XK-V7XM9-C7227-GCQG9
  108. set Enterprise=NPPR9-FWDCX-D2C8J-H872K-2YT43
  109. set EnterpriseN=DPH2V-TTNVB-4X9Q3-TJR4H-KHJW4
  110. set Education=NW6C2-QMPVW-D7KKK-3GKT6-VCFB2
  111. set EducationN=2WH4N-8QGBV-H22JP-CT43Q-MDWWJ
  112. set EnterpriseS=WNMTR-4C88C-JK8YV-HQ7T2-76DF9
  113. set EnterpriseSN=2F77B-TNFGY-69QQF-B8YKP-D69TJ
  114. goto windowsstart
  115. :windowsstart
  116. for /f "tokens=3 delims= " %%i in ('reg QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "EditionID"') do set EditionID=%%i
  117. if defined %EditionID% (
  118. cscript //Nologo %windir%\system32\slmgr.vbs /ipk !%EditionID%!
  119. cscript //Nologo %windir%\system32\slmgr.vbs /skms kms.library.hk
  120. cscript //Nologo %windir%\system32\slmgr.vbs /ato
  121. ) else (
  122. echo 找不到系列号,可能是旗舰版之类的系统……
  123. )
  124. goto office
  125. :wintooff
  126. echo 系统已经永久激活!转入office激活。
  127. goto office
  128. :win10tooff
  129. echo 成功的对系统进行永久激活!转入office激活。
  130. :office
  131. echo 检查安装的office……
  132. call :GetOfficePath 14 Office2010
  133. call :ActOffice 14 Office2010
  134. call :GetOfficePath 15 Office2013
  135. call :ActOffice 15 Office2013
  136. if exist "%ProgramFiles%\Microsoft Office\Office16\ospp.vbs" set _Office16Path=%ProgramFiles%\Microsoft Office\Office16
  137. if exist "%ProgramFiles(x86)%\Microsoft Office\Office16\ospp.vbs" set _Office16Path=%ProgramFiles(x86)%\Microsoft Office\Office16
  138. if DEFINED _Office16Path (echo.&echo 已发现 Office2016
  139. call :ActOffice 16 Office2016
  140. ) else (echo.&echo 未发现 Office2016)
  141. echo 操作成功完成!
  142. echo.&pause
  143. exit
  144. :ActOffice
  145. if DEFINED _Office%1Path (
  146. cd /d "!_Office%1Path!"
  147. echo 检查 %2 的激活状态。
  148. cscript //nologo ospp.vbs /act | find /i "successful" > NUL && (
  149. echo.&echo %2 已经激活,自动跳过 & echo.) || (
  150. echo.&echo %2 未激活,正尝试进行激活。
  151. if %1 EQU 16 call :Licens16
  152. cscript //nologo ospp.vbs /sethst:kms.library.hk >nul
  153. cscript //nologo ospp.vbs /act | find /i "successful" && (
  154. echo.&echo ***** %2 激活成功 ***** & echo.) || (echo.&echo ***** %2 激活失败 ***** & echo.)
  155. )
  156. )
  157. cd /d "%~dp0"
  158. goto :EOF
  159. :GetOfficePath
  160. echo.&echo 正在检测 %2 系列产品的安装路径...
  161. set _Office%1Path=
  162. set _Reg32=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\%1.0\Common\InstallRoot
  163. set _Reg64=HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\%1.0\Common\InstallRoot
  164. reg query "%_Reg32%" /v "Path" > nul 2>&1 && FOR /F "tokens=2*" %%a IN ('reg query "%_Reg32%" /v "Path"') do SET "_OfficePath1=%%b"
  165. reg query "%_Reg64%" /v "Path" > nul 2>&1 && FOR /F "tokens=2*" %%a IN ('reg query "%_Reg64%" /v "Path"') do SET "_OfficePath2=%%b"
  166. if DEFINED _OfficePath1 (if exist "%_OfficePath1%ospp.vbs" set _Office%1Path=!_OfficePath1!)
  167. if DEFINED _OfficePath2 (if exist "%_OfficePath2%ospp.vbs" set _Office%1Path=!_OfficePath2!)
  168. set _OfficePath1=
  169. set _OfficePath2=
  170. if DEFINED _Office%1Path (echo.&echo 已发现 %2) else (echo.&echo 未发现 %2)
  171. goto :EOF
  172. :Licens16
  173. for /f %%x in ('dir /b ..\root\Licenses16\project???vl_kms*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul
  174. for /f %%x in ('dir /b ..\root\Licenses16\proplusvl_kms*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul
  175. for /f %%x in ('dir /b ..\root\Licenses16\standardvl_kms*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul
  176. for /f %%x in ('dir /b ..\root\Licenses16\visio???vl_kms*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul
  177. for /f %%x in ('dir /b ..\root\Licenses16\project???vl_mak*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul
  178. for /f %%x in ('dir /b ..\root\Licenses16\proplusvl_mak*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul
  179. for /f %%x in ('dir /b ..\root\Licenses16\standardvl_mak*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul
  180. for /f %%x in ('dir /b ..\root\Licenses16\visio???vl_mak*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul
  181. cscript ospp.vbs /inpkey:NYH39-6GMXT-T39D4-WVXY2-D69YY >nul
  182. cscript ospp.vbs /inpkey:7WHWN-4T7MP-G96JF-G33KR-W8GF4 >nul
  183. cscript ospp.vbs /inpkey:RBWW7-NTJD4-FFK2C-TDJ7V-4C2QP >nul
  184. cscript ospp.vbs /inpkey:XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99 >nul
  185. cscript ospp.vbs /inpkey:YG9NW-3K39V-2T3HJ-93F3Q-G83KT >nul
  186. cscript ospp.vbs /inpkey:PD3PC-RHNGV-FXJ29-8JK7D-RJRJK >nul
  187. goto :EOF
  188. exit
  189. :xptooff
  190. echo 当前为WinXPWin2003
  191. call :GetOfficePath 14 Office2010
  192. call :ActOffice 14 Office2010
  193. :fail
  194. cls
  195. echo 无法连接到服务器……
  196. pause
  197. exit

网上大佬封的软件:
HEU_KMS_Activator_v19.6.0.zip