How to build a kms server

Option 1: docker mode

docker pull luodaoyi/kms-server

docker run -itd -p 1688:1688 --name kms luodaoyi/kms-server

docker update --restart=always $dockername

Option 2: docker compose

docker-compose.yml

 version: '3'
services:
    frontend:
        image: luodaoyi/kms-server
        container_name: mykms
        ports:
            - 1688:1688
        restart: always

 

docker-compose start the container

 docker-compose up -d

Active Script

echo "To active office"
cd "%programfiles%\Microsoft Office\Office16"
cscript ospp.vbs /sethst:xx.xx.xx.xx
cscript ospp.vbs /act

echo "to active windows"
slmgr /skms xxx.xxx.xxx.xxx
slmgr /ato

Reference