Activate windows and office with KMS

用管理员启动命令行CMD.EXE

Activate Windows

$ cscript C:\Windows\System32\slmgr.vbs /skms [KMS_SERVER_IP]
$ cscript C:\Windows\System32\slmgr.vbs /ato

Microsoft (R) Windows Script Host Version 5.812
Copyright (C) Microsoft Corporation. All rights reserved.

Activating Windows(R), Professional edition ...
Product activated successfully.

Activate Office

$ cd "C:\Program Files\Microsoft Office\Office16"
$ cscript ospp.vbs /sethst:[KMS_SERVER_IP]
$ cscript ospp.vbs /act

Installed product key detected - attempting to activate the following product:
SKU ID: 
LICENSE NAME: Office 16, Office16ProjectProVL_KMS_Client edition
LICENSE DESCRIPTION: Office 16, VOLUME_KMSCLIENT channel
Last 5 characters of installed product key: G83KT
Product activation successful