Activate Windows/Office (Run KMS Docker / Install KMS) - NETSEC


Learning, Sharing, Creating

Cybersecurity Memo

Wednesday, May 27, 2020

Activate Windows/Office (Run KMS Docker / Install KMS)

What is the Key Management Service (KMS)?
The Key Management Service (KMS) is an activation service that allows organizations to activate systems within their own network, eliminating the need for individual computers to connect to Microsoft for product activation. It does not require a dedicated system and can be easily co-hosted on a system that provides other services.
This post is to show how to run KMS Docker, How to install KMS and how to use KMS to activate your windows and office software.

Go Shorten URL:

Using KMS Docker

docker pull luodaoyi/kms-server
docker run -d -p 1688:1688 --restart=always --name="kms" luodaoyi/kms-server

Configure Windows System to Use KMS server
Run following commands from an elevated privilege command line window. 
slmgr /skms ip:1688
If you are using default port 1688, slmgr /skms ip

(slmgr /skms
activate your machine
slmgr /ato
check activation status
slmgr /xpr

You should be able to find the KMS server reference in the following registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform

Look for the KeyManagementServiceName data and this should return your KMS server. Do a ping of this and it should then return you the IP address of the KMS server.

Install KMS on Linux System

Log in as root user

wget --no-check-certificate && chmod +x && ./
Check port 1688
netstat -nxtlp | grep 1688

tcp        0      0      *                   LISTEN      3200/vlmcsd         
tcp        0      0 :::1688                     :::*                        LISTEN      3200/vlmcsd 
The script will automatically enable KMS service and add it into reboot start list.
Start:/etc/init.d/kms start
Stop:/etc/init.d/kms stop
Restart:/etc/init.d/kms restart
Status:/etc/init.d/kms status
Log in as root user
./ uninstall

Collected Windows Key 

Office 2019 & Office 2016:
Office 2013:
Office 2010:
CN Windows:
En Windows:

Activate Windows System

C:\Users\test>wmic os get caption
Microsoft Windows 10 Pro

Install Key which you found from above section (Microsoft : KMS client setup keys)
slmgr /ipk xxxxx-xxxxx-xxxxx-xxxxx-xxxxx
slmgr /skms Your IP or Domain:1688

Or  Use the command “slmgr /ipk yourlicensekey” to install a license key (yourlicensekey is the activation key that corresponds to your Windows edition). The following is the list of Windows 10 Volume license keys. Some of them from Microsoft website.

Home: TX9XD-98N7V-6WMQ6-BX7FG-H8Q99
Home Single Language: 7HNRX-D7KGG-3K4RQ-4WPJ4-YTDFH
Home Country Specific: PVMJN-6DFY6-9CCP6-7BKTT-D3WVR

Professional: W269N-WFGWX-YVC9B-4J6C9-T83GX
Professional N: MH37W-N47XK-V7XM9-C7227-GCQG9
Education: NW6C2-QMPVW-D7KKK-3GKT6-VCFB2
Education N: 2WH4N-8QGBV-H22JP-CT43Q-MDWWJ
Enterprise: NPPR9-FWDCX-D2C8J-H872K-2YT43
Enterprise N: DPH2V-TTNVB-4X9Q3-TJR4H-KHJW4

C:\Windows\system32>wmic os get caption
Microsoft Windows Server 2012 R2 Datacenter
C:\Windows\system32>slmgr /skms
C:\Windows\system32>slmgr /ipk W3GGN-FT8W3-Y4M27-J84CP-Q3VJ9
C:\Windows\system32>slmgr /ato
C:\Windows\system32>slmgr /xpr
//For Win10 Pro/Edu/Home
PS C:\Windows\system32> slmgr /ipk W269N-WFGWX-YVC9B-4J6C9-T83GX

For Windows 2012 R2 server: slmgr /ipk D2N9P-3P6X9-2R39C-7RTCD-MDVJX
For Windows 10 Enterprise LTSC: slmgr /ipk M7XTQ-FN8P6-TTKYV-9D4CC-J462D

For Windows 11:

run following commands under an administrator account
C:\Windows\system32>wmic os get caption
Microsoft Windows 11 Pro

C:\Windows\system32>slmgr /ipk W269N-WFGWX-YVC9B-4J6C9-T83GX

C:\Windows\system32>slmgr /skms

C:\Windows\system32>slmgr /ato

C:\Windows\system32>slmgr /xpr

If above key gives you an error, here is another key from Microsoft KMS site works for me when upgrading from home to pro:
Windows 11 Pro for Workstations
Windows 10 Pro for Workstations

For Windows 10:

run following commands under an administrator account
C:\Windows\system32>wmic os get caption
Microsoft Windows 11 Pro

C:\Windows\system32>slmgr /ipk M7XTQ-FN8P6-TTKYV-9D4CC-J462D

C:\Windows\system32>slmgr /skms

C:\Windows\system32>slmgr /ato

C:\Windows\system32>slmgr /xpr

Activate Office

It has to be VOL version.
Found your office installation folder, for 32B version, the location is  C:\Program Files (x86)\Microsoft Office\Office16
64B : C:\Program Files\Microsoft Office\Office16
Office16 is Office 2016,Office15 is Office 2013,Office14 is Office 2010。
Open the folder, OSPP.VBS should be in the list.
rum cmd as administrator
cd "C:\Program Files (x86)\Microsoft Office\Office16"
register your KMS server and port:
cscript ospp.vbs /sethst:Your IP or Domain
activate your Office VOL version. 
cscript ospp.vbs /act
Note: KMS activation only valid for 180 days, (6 months). You will need to re-activate it after 6 months. Please make sure your KMS server is up.


No comments:

Post a Comment