Microsoft and KMS

Practice



So, you have purchased Microsoft product licenses under a volume licensing program and received not only MAK keys but also a KMS key.


1) What is KMS?

In a nutshell: KMS lets you set up an activation server inside your organization's Active Directory domain that will service your computers.

This way, software that requires activation will reach out not to Microsoft's servers on the internet, but to some computer within your company. Why is this better?

a) Your internet channel isn't loaded with reactivation requests - by the way, these happen every week by default.
b) You are free to reactivate licenses as many times as you like, without worrying that Microsoft's servers will ban you "for reactivating too often and from different machines." This is very convenient when you're replacing your PC fleet, since products get reactivated frequently as a result.
c) And simplicity of installation - it's enough to install the product without entering any key during setup, and join the computer to the domain - and the software will find the KMS server itself and activate. You don't even need to remember or carry around an activation key - once the KMS server is set up, it won't be needed again until that very server is reinstalled.


2) Where should KMS be installed?

Depending on the product class, KMS can be installed either on a Windows Vista/7 client machine, or on Windows Server 2008.

If you have only purchased Windows Vista or Windows 7, KMS needs to be deployed on one of the computers running that very OS. You don't need Windows Server. Just keep in mind that KMS should be deployed on the machine that stays powered on and connected to the network as much of the time as possible, so client computers can connect to it without issues.

If you've purchased Windows Server 2008, then, accordingly, you install KMS on it. In that case, this same WS2008 KMS server will also successfully activate machines running the desktop OS Windows Vista or Windows 7.


3) How do you set up KMS?

Couldn't be simpler. You pick the computer that will be the KMS server and activate it with the KMS key. That is, you open the computer properties window, click "activate now," enter the KMS key, agree to the warning that this computer will take on the role of a KMS server, and... that's basically it.

The procedure is the same for Windows Vista/7 and for Windows Server 2008+.

Let me note again - when installing the KMS server on Windows Server (accordingly, having a KMS key for Windows Server and, of course, a license), there is no need to set up another KMS for client machines, for example on some computer running Windows 7!


4) Client computers - how do you activate them through KMS?

Install Windows without entering any keys (leave the field blank). Join it to the domain. Go to the computer properties and click "Activate now".

The first 25 computers will initially show something like "the KMS service reported that the count is insufficient" (more on this below). Once the required number accumulates (25 units for Windows Vista/7, or 5 for Windows Server), all the computers will simply start activating. On their own.

There's nothing special you need to do - it just works on its own )))


5) Why does KMS mention something about a counter when activating other computers?

Because Microsoft has restricted the scope of KMS activation to medium and large companies. An activated KMS server will not hand out activations until a certain number of client computers has contacted it.

For Windows Vista/7 (desktops), 25 DIFFERENT computers are required.
For Windows Server 2008, 5 DIFFERENT servers are required.

So until you accumulate 25 computers running Windows Vista or 7 reaching out to the KMS server for activation (and, accordingly, these must not be boxed copies or systems already activated via MAK), systems will not start activating.

For servers, 5 servers are enough to start the activation process.


6) How can you check the current counter value on the KMS server computer?

In the command line (Start->Run, remember?) enter the command:

slmgr.vbs /dli

And look at the information for the current license. Among it, on the computer that is the KMS server, the current counter value will also be displayed.


7) How can you boost this counter?

Ummm... Anyway, the trick is that when the OS is installed, a unique UID is generated that doesn't match between two systems installed on the same computer from the same distribution - that is, a random ID of sorts.

The KMS server remembers this ID, so the trick of "create a virtual machine and copy it" doesn't work - the ID will be the same, and KMS will count it as a single computer.

Several methods for boosting the counter circulate on the internet, but I only found one that actually works: simply install 25 (or however many you're short) virtual machines (or just reinstall Windows that many times). It doesn't depend on the hardware itself - so you can simply reinstall the OS the required number of times on one and the same computer, and everything will be just dandy.

BUT! One remark! You shouldn't do this (boost the counter) if you don't physically have the actually required number of computers that you are, say, gradually planning to migrate from XP to Windows 7 or the like, because after some time (a few months) the KMS server, being no fool, and not seeing the needed computers on the network for an extended period, "forgets" about them and, accordingly, lowers its counter.

I see any justification for boosting the counter only in the case where you're gradually migrating from Windows XP to newer versions. Everyone except Microsoft understands that it's unrealistic to reinstall dozens of computers all at once (even via upgrade): often, besides their Office, computers have various narrowly specialized programs with tricky activation or license binding that frequently don't work right away in a Windows 7 environment due to incompatibilities, and so on.


8) How do I activate Windows from the command line?

slmgr.vbs /ato


9) How do computers find the KMS server?

KMS registers itself on the DNS server of your Active Directory domain controllers using a TXT record. During activation, client computers query your domain zone for TXT records related to KMS content and reach out to the IP address specified in that record.

The KMS server itself updates the IP, you don't need to worry about that.


10) How do I turn off DNS publication of the KMS server or turn it back on?

ATTENTION! Do this as an administrator! Not a domain admin, but "Run as administrator" (assuming UAC is enabled).

slmgr.vbs /cdns

And be sure to reboot.

If you need to turn DNS publication of your KMS server back on:

slmgr.vbs /sdns

And reboot again.


11) I changed something in KMS, but client computers still reach out to the old IP:port.

Yes, client machines cache the TXT records of KMS servers. There are two options:
a) Wait. I don't remember the TTL of KMS records, but within a day the computers will start reaching out using the new details.
b) Disable caching of KMS details on the computers and flush the DNS cache (as administrator!):

slmgr.vbs /ckhc
ipconfig /flushdns

If you need to turn caching back on:

slmgr.vbs /skhc


12) How do you change the reactivation interval?

By default, every computer requests its activation status again every 7 days. To change this value, run the command (as administrator):

slmgr.vbs /sri XXX

where instead of XXX you substitute the number of minutes (from 30 minutes to 30 days). Activated computers will refresh their activation status at this interval.


13) What else can be done through SLMGR?

The command

slmgr.vbs

without any parameters will show you a 4-page hint of what it can do.


14) Where are these TXT records located on the DNS server?

Open the DNS server snap-in, expand "Forward Lookup Zones".
Go into the zone named after your domain.
Open the "_tcp" tab.
The records named "_VLMCS" are exactly the TXT records of the KMS servers within your domain.


So there you have it - in a nutshell, the most useful things about KMS. More information can be found on Microsoft's website, and for SLMGR, in its own help.

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Operating Systems and System Programming"

Terms: Operating Systems and System Programming