Setup your own KMS server
I have setup a KMS server on my CentOS VPS, it allows me to significantly simply the process of activating Microsoft products on the corporate network.
Here are the installation steps:
Firstly, download the latest version of vlmcsd and unzip.
1 | # find latest version on https://github.com/Wind4/vlmcsd/releases |
Startup vlmcsd with command:
1 | ./vlmcsd-x64-musl-static -L 0.0.0.0:xxxx |
Just use the IP+Port is all right, certainly you can also bind domain by Nginx forward.
1 | server { |
Secondly check availability.
1 | # other port ./vlmcs-x64-musl-static 0.0.0.0:16882 |
On Windows open CMD, enter \binaries\Windows\intel
directory.
1 | vlmcs-Windows-x86.exe [IP or domain]:[Port] |
Finally activate Windows/Office
Find the Vol key that corresponds to Windows or Office (make sure the Office is Vol version).
Windows
Install the key you find above:
1 | slmgr /ipk xxxxx-xxxxx-xxxxx-xxxxx-xxxxx |
Set KMS server:
1 | slmgr /skms [IP或domain]:[端口号] |
Activate OS:
1 | slmgr /ato |
Office
Go to the Office installation directory, for example the default for 64-bit Office 2016 is:
1 | C:\Program Files\Microsoft Office\Office16 |
Install the key you find above:
1 | cscript ospp.vbs /inpkey:xxxxx-xxxxx-xxxxx-xxxxx-xxxxx |
Run CMD with administrator, and registry KMS server address:
1 | cscript ospp.vbs /sethst:[domain] |
Activate Office:
1 | cscript ospp.vbs /act |
查看激活信息:
View activation info:
1 | cscript ospp.vbs /dstatus |
Registry service
The KMS method of activation is valid for 180 days, so keep the vlmcsd service running, it will request a renewal automatically.
Create a vlmcsd.service
file and edit.
1 | [Unit] |
Configure vlmcsd as a system service.
1 | cp vlmcsd.service /etc/systemd/system/ |
Then you can Manage vlmcsd service with systemctl
.
1 | # reload |