Build your own KMS server to activate MS Windows and MS Office

網速問題,不常來CSDN了,想要閱讀更多博文,請訪問我的個人博客站。http://linuxexam.net

Note: It's illegal to activate Windows/Office by a non-authorized KMS server.  This article is for learning purpose only. Buy a license from Microsoft if you want to use it daily.

1. What are KMS and KMS server

KMS stands for Key Management Service, which is used for activating multiple Windows or Offices. Microsoft produces KMS server software that can run on Windows platforms. The KMS server software needs a product key for itself from Microsoft.

 

The Windows to be activated use the same product key (GVLK/General Volume Licensing Key) published publicly officially by Microsoft at:

https://docs.microsoft.com/en-us/windows-server/get-started/kmsclientkeys

 

Like many other software, KMS server has also been hacked. Many unofficial KMS server exist, of which is the open sourced vlmcsd with source code published on github at 

https://github.com/Wind4/vlmcsd.

 

In this article, we will use vlmcsd to demonstrated how to active windows via KMS.

 

2. Build a KMS server with vlmcsd on CentOS 7

To be honest, vlmcsd goes with decent documents especially the manual pages. It can run on many different Oses including Windows, Linux, and Android. We use Linux (CentOS) in this article.

 

git clone https://github.com/Wind4/vlmcsd.git

cd vlmcsd

make

 

After make, a new directory vlmcsd/bin was created. The binaries are inside this folder.

 

cd ./bin

./vlmcsd -De  # -D for foreground running,  -e for stdout print

 

vlmcsd listens on 1688/TCP by default. Let's add a firewall rule to let incoming packets for it get through.

 

firewall-cmd --add-port=1688/tcp --permanent

firewall-cmd --reload

 

To verify:

[root@localhost ~]# firewall-cmd --list-ports

1688/tcp

 

Simple? Yes, we have done everything and a KMS server is running ready to activate any Windows OS.

 

Our KMS server is set up with an IP address: 192.168.0.10.

 

3. example: Activate Windows server 2016

The Windows Server 2016 evaluation version can be downloaded from Microsoft's website. It is free to use for 180 days.

 

Let's find the GVLK for Windows server 2016.

 

Windows Server 2016

Operating system edition

KMS Client Setup Key

Windows Server 2016 Datacenter

CB7KF-BWN84-R7R2Y-793K2-8XDDG

Windows Server 2016 Standard

WC2BQ-8NRM3-FDDYY-2BFGV-KHKQY

Windows Server 2016 Essentials

JCKRF-N37P4-C2D82-9YXRT-4M63B

 

Open a command line console as Aministrator.

 

# 1、Uninstall current evaluation key


slmgr.vbs -upk


# 2、install new GVLK


slmgr.vbs -ipk WC2BQ-8NRM3-FDDYY-2BFGV-KHKQY

 

# 3、set the KMS server IP(default 1688 port)


slmgr.vbs -skms 192.168.0.10


# 4、attempt online (activate)


slmgr.vbs -ato


# 5、Display license version


slmgr.vbs -dlv

 

Attention:

 

On step 2, an error occurs as below.

 

“Error: 0xC004F069 On a computer running Microsoft Windows non-core edition, run ‘slui.exe 0x2a 0xC004F069’ to display the error text”

This is because the current edition is an evaluation. Before it can be activated as Standard edition, we need to change it.

 

# Check what target editions it can be changed to

DISM.exe /Online /Get-TargetEditions

 

# Change it to Standard Edition

DISM.exe /online /Set-Edition:ServerStandard /ProductKey:WC2BQ-8NRM3-FDDYY-2BFGV-KHKQY /AcceptEula

Then, continue with Step 3,4,5.

4 Example: Activate Windows 10 Pro

Windows 10 can be downloaded from Microsoft's website freely. When installing it, you can select what edition to be installed. Here we selected "Windows Pro".

 


Find the GVLK for Windows 10 Pro:

 

Windows 10, all supported Semi-Annual Channel versions

See the Windows lifecycle fact sheet for information about supported versions and end of service dates.

Operating system edition

KMS Client Setup Key

Windows 10 Pro

W269N-WFGWX-YVC9B-4J6C9-T83GX

Windows 10 Pro N

MH37W-N47XK-V7XM9-C7227-GCQG9

Windows 10 Pro Workstations

NRG8B-VKK3Q-CXVCJ-9G2XF-6Q84J

Windows 10 Pro Workstations N

9FNHH-K3HBT-3W4TD-6383H-6XYWF

Windows 10 Pro Education

6TP4R-GNPTD-KYYHQ-7B7DP-J447Y

 

Open a command line console as Aministrator.

 

# 1、Uninstall current evaluation key


slmgr.vbs -upk


# 2、install new GVLK


slmgr.vbs -ipk W269N-WFGWX-YVC9B-4J6C9-T83GX

 

# 3、set the KMS server IP(default 1688 port)


slmgr.vbs -skms 192.168.0.10


# 4、attempt online (activate)


slmgr.vbs -ato


# 5、Display license version


slmgr.vbs -dlv

 

Attention:

 

Windows 10 doesn't support setting an edition online, so make sure you selected the right edition when installing it.

 

To find the current edition, you can run:

 

DISM.exe /Online /Get-CurrentEdition

 

5. Example: Activate Office 2016 Pro Plus

As for Windows, Microsoft publishes GVLK for Offiice as well.

 

https://docs.microsoft.com/en-us/deployoffice/vlactivation/gvlks

 

One issue is Office cannot be downloaded from Microsoft without a product key. Here I just want to see you have to find your own way to get a copy of it. Make sure it's VOL version not retail.

 

GVLKs for Office 2016

 

Product

GVLK

Office Professional Plus 2016 

XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99 

Office Standard 2016 

JNRGM-WHDWX-FJJG3-K47QV-DRTFM 

Project Professional 2016 

YG9NW-3K39V-2T3HJ-93F3Q-G83KT 

Project Standard 2016 

GNFHQ-F6YQM-KQDGJ-327XX-KQBVC 

 

Open a command line console as Administrator:


# 1. Enter office's installation dir

cd C:\Program Files\Microsoft Office\Office16


# 2. Install GVLK

cscript.exe ospp.vbs /inpkey:XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99


# 3. set KMS server

cscript.exe ospp.vbs /sethst:192.168.0.10


# 4. try to activate office

cscript.exe ospp.vbs /act


# 5. check activation status

cscript.exe ospp.vbs /dstatus

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章