Skip to content

Instantly share code, notes, and snippets.

@gorgone
Forked from CHEF-KOCH/LOCALKMSdeamon.sh
Created February 18, 2020 07:58
Show Gist options
  • Save gorgone/942a06b44f6a6a4381a260cbe91cef66 to your computer and use it in GitHub Desktop.
Save gorgone/942a06b44f6a6a4381a260cbe91cef66 to your computer and use it in GitHub Desktop.
Windows 10 LTSC and KMS server guide

Steps to follow

  • Login as root, then run and then run `cp vlmcsd-master/bin/vlmcs* /usr/local/sbin/
  • pico /etc/init.d/vlmcsd
  • Execute the LOCALKMSdeamon.sh (see below)
  • systemctl enable vlmcsd
  • systemctl start vlmcsd

Activation via elevated prompt

  • slmgr /skms 192.168.1.2
  • slmgr /ato

FAQ

Q: Is this illegal? A: No, because you use it locally for tests only!

Q: Are there benefits? A: Yes, you do not contact any other "official" KMS MS server and you have full control over your data and you can activate/re-activate it at any time. There are no limitations.

Q: Can I activate other producst like MS Office? A: Yes, it also works with Office (VL Editions). Only the execution commands in command prompt differ. See: https://docs.microsoft.com/en-us/deployoffice/vlactivation/activate-office-by-using-active-directory

#!/bin/sh
### BEGIN INIT INFO
# Provides: vlmcsd
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: KMS server
### END INIT INFO
# Author: Hotbird64
#
# Do NOT "set -e"
if [ `id -u` != 0 ]; then
echo "Must be root to run this"
exit 1
fi
PATH=/usr/local/sbin:/sbin:/usr/sbin:/usr/local/bin:/bin:/usr/bin
DESC="Microsoft KMS daemon"
NAME=vlmcsd
DAEMON=/usr/local/sbin/$NAME
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
LOGFILE=syslog
PORT=1688
# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
DAEMON_ARGS="-l $LOGFILE -p $PIDFILE -P $PORT"
# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh
# Define LSB log_* functions.
# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
# and status_of_proc is working.
. /lib/lsb/init-functions
#
# Function that starts the daemon/service
#
do_start()
{
status="0"
pidofproc -p $PIDFILE $DAEMON >/dev/null || status="$?"
if [ $status -eq 0 ]; then
log_action_msg "already running"
return 3
fi
$DAEMON $DAEMON_ARGS $EXTRA_ARGS
return $?
}
#
# Function that stops the daemon/service
#
do_stop()
{
if [ ! -f $PIDFILE ]; then
log_action_msg "service not running"
return 4
fi
kill `cat $PIDFILE`
return $?
}
case "$1" in
start)
log_daemon_msg "Starting $DESC" "$NAME"
do_start
case "$?" in
0) log_end_msg 0 ;;
*) log_end_msg 1 ;;
esac
;;
stop)
log_daemon_msg "Stopping $DESC" "$NAME"
do_stop
case "$?" in
0) log_end_msg 0 ;;
*) log_end_msg 1 ;;
esac
;;
restart|force-reload|reload)
log_daemon_msg "Restarting $DESC" "$NAME"
do_stop
sleep 1
do_start
case "$?" in
0) log_end_msg 0 ;;
*) log_end_msg 1 ;; # Failed to start
esac
;;
status)
status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $?
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|status|reload|restart|force-reload}" >&2
exit 3
;;
esac

Prerequirements

You need one of the following ISO's::

  • en_windows_10_enterprise_ltsc_2019_x64_dvd_be3c8ffb.iso
  • SW_DVD5_WIN_ENT_LTSC_2019_64-bit_English_MLF_X21-96425.ISO

Checksum SHA-1: D5B2F95E3DD658517FE7C14DF4F36DE633CA4845

DL

drive.asoftkey.com/MS%20Win%20ISO/

Local KMS server

codeload.github.com/kkkgo/vlmcsd/zip/master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment