Эта статья посвящена подробному описанию особенностей функционирования и использовании технологии KMS активации продуктов Microsoft. Служба управления ключами KMS (Key Management Server) позволяет корпоративным заказчикам программы Volume License развертывать в сети собственный хост, на котором будут активироваться все клиенты. Благодаря KMS, устройствам в сети не нужно обращаться к серверам активации Microsoft в интернете для активации Windows, Office, Project, или Visio.
Содержание:
- Архитектура службы KMS активации Microsoft
- Установка KMS сервера на Windows Server в корпоративной сети
- Активация клиента Windows с помощью KMS сервера
- Активация MS Office на KMS сервере
- VAMT: Управление корпоративными ключами
- Распространённые ошибки при использовании KMS сервера активации
Архитектура службы KMS активации Microsoft
Инфраструктура KMS состоит из KMS-сервера, который активируется в Microsoft (эта операция выполняется один раз по телефону или онлайн) и клиентов KMS, отправляющих запросы на активацию на KMS сервер. В качестве клиентов KMS сервера могут выступать рабочие станции Windows, хосты с Windows Server и компьютеры установленным Microsoft Office 2021/2019/2016/2013.
Сам KMS сервер активируется с помощью специального корпоративного CSVLK ключа (KMS host key), получить который может каждый корпоративный клиент Microsoft в личном кабинете на сайте корпоративного лицензирования VLSC (https://www.microsoft.com/Licensing/servicecenter/default.aspx — Microsoft Volume Licensing Service Center –> License -> Relationship Summary -> Product Keys -> скопируйте ключ для Windows Srv 2019 DataCtr/Std KMS).
На данный момент KMS host key по-умолчанию отсутствует в VLSC. Microsoft сгенерирует вам KMS ключ только после запроса в техподдержку.
Ключ CSVLK нужно указать на KMS сервере и затем выполнить активация вашего KMS сервера в интернете на серверах Microsoft. KMS сервер нужно активировать только один раз.
Один KMS сервер может активировать неограниченное число KMS клиентов. Например, даже несмотря на то, что в вашем соглашении указано, что вы приобрели корпоративную лицензии на 100 компьютеров, теоретически вы можете активировать тысячи компьютеров (конечно, это будет нарушением лицензионного соглашения, но технически KMS сервер вас в этом не ограничивает). Также отметим, что информация о проведенных активациях и их количестве не передается KMS севером за пределы организации.
KMS сервер может активировать клиентов в разных доменах, а также клиенты в рабочих группах. Один KMS сервер может одновременно активировать и десктопные редакции Windows, и Windows Server и продукты из пакета Microsoft Office.
При установке KMS сервера можно автоматически зарегистрировать специальную SRV (_VLMCS) запись в DNS. По этой DNS записи любой клиент может найти имя KMS сервера в домене. Например, чтобы найти KMS сервер в вашем домене corp.winitpro.ru, выполните команду:
nslookup -type=srv _vlmcs._tcp.corp.winitpro.ru
_vlmcs._tcp.corp.winitpro.ru SRV service location: priority = 0 weight = 0 port = 1688 svr hostname = msk-man01.corp.winitpro.ru msk-man01.corp.winitpro.ru internet address = 10.1.10.25
В этом примере видно, что служба KMS развернута на сервере msk-man01 и отвечает по порту TCP 1688.
Чтобы KMS сервер мог активировать клиента, на клиенте (Windows или Office) должен быть указан специальный публичный ключ KMS, который называется GVLK ключом (Generic Volume License Key- универсальный ключ многократной установки). После того, как вы указали GVLK ключ, клиент KMS пытается сам найти в DNS SRV запись, указывающую на сервер KMS и пытается произвести активацию.
Полный список GVLK ключей для всех поддерживаемых версий Windows доступен на сайте Microsoft по ссылке https://learn.microsoft.com/en-us/windows-server/get-started/kms-client-activation-keys
KMS сервер, активированный более новым ключом KMS host key, может активировать все предыдущие версии Windows, но не наоборот. Например, KMS сервер, актированный ключом Windows Srv 2016 DataCtr/Std KMS не сможет активировать компьютеры Windows 11 или Windows Server 2022/2019. Для поддержки современных версий Windows вам нужно получить новый CSVLK ключ и активировать его на KMS сервере.
Совет. Для доменной сети AD Microsoft позволяет использовать специальное расширение KMS, которое называется Active Directory Based Activation (ADBA). ADBA позволяет автоматически активировать компьютеры с Office, Windows, или Windows Server добавленные в домен Active Directory. В этом случае выделенный KMS сервер отсутствует, но вы не сможете активировать устройства не в домене или в другом лесу.
Установка KMS сервера на Windows Server в корпоративной сети
Для развертывания службы KMS вам нужен хост с Windows Server (можно совмещать роль KMS с другими ролями).
Служба KMS не требовательна к ресурсам, поэтому эту роль можно установит на любой хост. К службе KMS обычно не предъявляется требований высокой доступности. Если сервер KMS не доступен несколько часов (и даже дней), этот простой никак не скажется на работе предприятия.
- Установите роль Volume Activation Services через консоль Server Manager или командой PowerShell:
Install-WindowsFeature -Name VolumeActivation -IncludeAllSubFeature –Include ManagementTools - Затем откройте командную строку, установите корпоративный CSVLK ключ и активируйте ваш KMS сервер в Microsoft:
slmgr /ipk <KMS_host_ключ_Windows_Server_2019>
slmgr /atoПри выполнении онлайн активации самого сервера KMS (выполняется один раз), с сервера KMS должны быть доступны сайты Microsoft по портам 80/443. В изолированной среде сервер KMS можно активировать по телефону (телефон поддержки Microsoft для вашей страны можно найти в файле
%windir%System32\SPPUI\Phone.inf
). - Клиенты по-умолчанию будут подключаться к KMS серверу по порту TCP/1688. Включите соответствующее правило Windows Firewall:
Enable-NetFirewallRule -Name SPPSVC-In-TCP - Чтобы опубликовать SRV запись для KMS сервера в DNS, выполните команду:>
slmgr /sdns - Проверьте, что ваш KMS сервер активирован:
slmgr.vbs /dlv
Команда должна вернуть что то в виде, Description =
VOLUME_KMS_WS22 channel
, License status =
Licensed
.
Активация клиента Windows с помощью KMS сервера
Для ручного управления KMS активация на компьютерах Windows используется встроенный VBS скрипт
%WinDir%\System32\slmgr.vbs
. Вы можете вывести его опции, просто выполните эту команду без параметров.
Чтобы вручную активировать рабочую станцию с Windows или хост Windows Server на KMS сервере, выполните следующие действия.
- Задайте GVLK ключ в зависимости от версии Windows (полный список публичных GVLK ключей есть на сайте Microsoft по ссылке выше). Например, для Windows 10 или 11:
slmgr /ipk W269N-WFGWX-YVC9B-4J6C9-T83GX - Если в домене не настроено автообнаружение KMS (по SRV записи), вы можете указать адрес KMS сервера и порт вручную:
slmgr /skms msk-man02.winitpro.ru:1688 - Теперь можно выполнить активацию вашей копии Windows на KMS сервере:
slmgr /ato
Должна появиться надпись:--------------------------- Windows Script Host --------------------------- Activating Windows(R), EnterpriseS edition (xxxxxxxxxxxxxxxxxxxx) ... Product activated successfully.
- Проверить статус активации Windows:
slmgr /dlv
Если Windows успешно активировалась на KMS тут должно быть указано:VOLUME_KMSCLIENT channel License status: Licensed
Обратите внимание, что активация продуктов Microsoft на сервере KMS возможна только при удовлетворении следующих требований к минимальному количеству KMS клиентов (т.н. порог активации):
- Клиентские ОС: 25
- Серверные ОС: 5
- MS Office: 5
После того, как количество обращений на активацию от клиентов превысит порога активации, сервер KMS начнет активировать лицензии. Текущее значение клиентов KMS можно получить с помощью команды:
slmgr.vbs /dlv
Значение в поле Current Count не увеличивается после достижения 50.
Компьютеры, активированные на KMS сервере для продления активации должны подключатся к KMS серверу как минимум один раз в 180 дней. Если компьютер не подключался более 180 дней, то активация активация продукта “слетает”, и Windows переходит в режим ознакомительного использования (grace period).
Для устройства, которые не подключены к корпоративной сети рекомендуется использовать MAK ключ (ключ многократной активации).
Активация MS Office на KMS сервере
Для активации продуктов MS Office на KMS сервере нужно установить специальное расширение Microsoft Office Volume License Pack. В зависимости от версии MS Office, которая используется у вас, вам нужно скачивать и установить соответствующую версию volumelicensepack. Сейчас доступны:
- Microsoft Office 2016 Volume License Pack
- Microsoft Office 2019 Volume License Pack
- Microsoft Office LTSC 2021 Volume License Pack
После установки License Pack для MS Office, на KMS сервере нужно установить ваш персональный CSVLK ключ для Office и выполнить его активацию.
Для управления активацией продуктов из пакета Microsoft Office на клиентах используется другой vbs скрипт — ospp.vbs. Его можно найти поиском в каталоге установки Office (в случае Office 2016 файл ospp.vbs находится по-умолчанию в каталоге
\Program Files\Microsoft Office\Office16
).
Чтобы вручную указать адрес KMS сервера на клиенте Office:
cscript ospp.vbs /sethst: msk-man02.winitpro.ru
Изменить порт для активации:
cscript ospp.vbs /setprt:1689
Активировать вашу копию Office на KMS сервере:
cscript ospp.vbs /act
Текущий статус активации Office 2019/2016/365 можно получить с помощью команды:
cscript ospp.vbs /dstatusall
VAMT: Управление корпоративными ключами
Для удобства управления KMS серверами и ключами можно установить специальную утилиту Volume Activation Management Tool (VAMT).
- Утилита VAMT не является частью поставки ОС, входит в состав пакета Windows Assessment and Deployment Kit (ADK) и устанавливается отдельно;
- Для работы VAMT требуется .NET Framework;
- В качестве БД VAMT используется SQL Server Express;
- Последняя доступная версия VAMT поддерживает все ОС Microsoft, включая Windows 10 и Windows Server 2019.
Распространённые ошибки при использовании KMS сервера активации
- Установка корпоративного ключа KMS (CSVLK ключа) на клиентах вместо общедоступного GVLK ключа;
- Общий KMS ключ (CSVLK) не соответствует версии ОС на активируемом хосте;
- Сервер KMS должен быть обновлён для поддержки активации последних версий продуктов Microsoft;
- Если при попытке активации появляется ошибка 0xC004F074 – причиной может быть отсутствие SRV записи
_VLMCS._tcp.winitpro.ru
в DNS. Ее можно создать вручную или указать адрес KMS сервера вручную (команда указана ниже); - Ошибка 0xC004F038 говорит о том, что в вашей сети не набралось необходимого количества клиентов для активации (см. информацию о пороге активации выше). Как только на KMS сервер поступит достаточное количество запросов активации, она начнет выполнять активацию клиентов;
- Проверьте доступность порта 1688 на KMS сервере с помощью командлета Test-NetConnection:
TNC msk-mankms -Port 1688 -InformationLevel Quiet
Если порт недоступен, возможно доступ блокируется файерволом, или на KMS сервере не запущена служба Software Protection (sppsvc); - Для получения более подробной информации о конкретной ошибке активации Windows используете команду:
slui.exe 0x2a ErrorCode - Также см. статью — «Список распространенных ошибок активации Windows«.
Key Management System (KMS) allows enterprise customers to activate Windows operating systems using a locally hosted service, eliminating the need for individual computers to connect to Microsoft activation servers on the Internet. This article describes how to deploy a KMS server and use it to activate Windows client computers.
Understanding KMS Activation
The KMS activation server allows to activate volume editions of the Windows OS and Microsoft Office products within the corporate network. KMS is based on a client-server architecture. The general KMS activation scheme is shown below.
The KMS volume activation architecture is based on a computer running Windows Server with the Volume Activation Services role installed (1). This server is known as the KMS Host.
KMS Host is activated with the KMS Host Key. KMS Server requires one-time activation through Microsoft Activation Services (by phone or online) (2).
In order for domain clients to be able to discover it (4), the KMS server registers a special record in the DNS (3).
Now your corporate devices can automatically (or manually) connect to the KMS server (on default port TCP/1688) and activate Windows (5). On the KMS server, you can activate both Windows 10 and 11 desktop editions, as well as Windows Server 2022, 2019 and 2016.
The main advantages of KMS activation:
- KMS infrastructure is simple and scalable. Thousands of clients can be activated with a single KMS server;
- Client KMS activation is valid for 180 days and the KMS client renews activation every 7 days (default);
- If the KMS client is unable to contact the KMS license server for 180 days, your Windows device will be given a grace period of 30 days. After the 30-day grace period expires, Windows will switch to “Reduced Functionality Mode” (RFM);
- KMS activation on domain-joined computers through the Active Directory Based Activation (ADBA) requires no user interaction;
- KMS Server with the Microsoft Office Volume License Pack installed can be used to activate the Microsoft Office product on client computers (described in detailed in Microsoft Office KMS activation);
Deploying KMS Volume Activation Role on Windows Server
You can install a KMS server on Windows Server 2022, 2019, or 2016. Open the Server Manager GUI and go to Add Roles and Features > Roles, install the Volume Activation Services role.
Or, you can install and configure the KMS server role using PowerShell:
- Open the PowerShell console as administrator and run the command:
Install-WindowsFeature -Name VolumeActivation -IncludeAllSubFeature –IncludeManagementTools
- Open TCP port 1688 in the Windows Defender Firewall:
Enable-NetFirewallRule -Name SPPSVC-In-TCP
- Sign-in Microsoft 365 Admin Center (Billing > Your Products > Products and Services > Volume licensing and copy your KMS Host Key (Windows Srv 2022 DataCtr/Std KMS), formally known as a Microsoft Customer Specific Volume License Key (CSVLK).
- Install your KMS host key using the command:
slmgr /ipk <your_Windows_SRV_2022_KMS_host_key>
- Perform a one-time online activation (authentication) of your KMS host on Microsoft Activation Services:
slmgr /ato
- To check the KMS host activation status, run:
slmgr /dlv
- Now you can configure KMS clients to activate on your KMS server.
Note. The KMS server is able to activate all previous versions of Windows. For example, if you activate your KMS server with the Windows Srv 2019 host key, you won’ be able to activate Windows 11 or Windows Server 2022. The maximum supported versions of Windows to activate in this case are Windows 10 and Windows Server 2019.
How to Activate Windows with KMS License Server
Install a KMS Client Key (GVLK) on Windows
KMS sever can only activate Windows clients installed with a specific product key — public KMS Client Setup Key (formally known as the Microsoft Generic Volume License Key, GVLK). This means that you should first change the Windows product key to KMS client key from the Windows GUI (use the command slui.exe 4), or you can use the slmgr command-line tool.
The complete list of public GVLK product keys for Windows is available on the Microsoft website (https://learn.microsoft.com/en-us/windows-server/get-started/kms-client-activation-keys). These keys are provided officially by Microsoft. Find and copy the GVLK for your version of Windows.
For example, according to this table, the W269N-WFGWX-YVC9B-4J6C9-T83GX KMS Client Product Key should be used for Windows 11 and 10 Professional edition.
Install the GVLK key on Windows:
slmgr.vbs /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
Wait until the confirmation message “Product key XXXXX installed successfully” appears.
Note. If your Windows device was previously activated using the MAK key, this will change the product key from MAK to KMS (GVLK).
Now you can activate your Windows on the KMS server:
Slmgr.vbs /ato
And wait until the message Product activated successfully appears;
In this case, the Windows client used the SRV (_VLMCS) record in the Active Directory DNS to discover the KMS server on a domain.
Tip. You can manually find the KMS server address in AD DNS using the nslookup command:
nslookup -q=SRV _VLMCS._TCP.theitbros.com
This command lists all registered KMS entries.
Manually Activate Windows with KMS Server
You can manually specify the KMS server address on a client if this SRV record is missing, or if your computer is not joined to an AD domain using the slmgr with the /skms option.
You can manually specify the address of the KMS server using the slmgr with the /skms option:
slmgr.vbs /skms <KMS_server_name_or_IP>:1688
You can test network connectivity between your computer and the KMS server using the PowerShell command:
Test-NetConnection -ComputerName KMS_server_name_or_IP -Port 1688
Then you can activate your Windows client with the KMS server:
Slmgr.vbs /ato
Check the Status of Windows Activation
Optionally, you can check the Windows activation status:
slmgr.vbs /dli
The command returned the following info:
- Name — the OS version;
- Description — distribution channel VOLUME_KMSCLIENT channel;
- License status — licensed;
- Volume activation expirations — 180 days;
- KMS server IP address and DNS name (Registered KMS machine name).
If you want to check when the license period expires:
slmgr /xpr
The slmgr.vbs tool can be used to perform KMS activation on remote Windows computers. The following command will check the activation status on the remote computer named nywsdx3323. The connection credentials are specified in plain text:
slmgr.vbs nywsdx3323 administrator P@ssw0rdd -dli
KMS Activation Known Errors
Most often users face the following errors when activating Windows with the KMS server:
- 0xC004F074 (The software licensing service reported that the computer could not be activated. No Key Management Service (KMS) could be contacted) — the KMS server is not available. This means that the KMS service is not running on the target server or that access to it is blocked by a firewall.
- 0xC004F038 (The Software Protection Service reported that the computer could not be activated. The count reported by your Key Management Service (KMS) is insufficient. Please contact your system administrator) —you have not reached the required number of activation requests on the KMS server (called the activation threshold). Minimum number of KMS clients is 25 for Desktop Windows Edition, and 5 for Windows Server. You can check the current count of hosts connected to the KMS server with the command slmgr.vbs /dli. Target more Windows hosts to your KMS server;
- 0xC004F015 (The Software Protection Service reported that the product key is not available) — error occurs when you try to activate a newer version of Windows OS on the KMS server that is activated with the old KMS host key. In this case, you need to get a new KMS host key from VLSC and reactivate your KMS server.
- 0x80072F8F (We can’t activate Windows on this device at the moment. You can try activating later) — check if the time and date on your device are correct. If necessary, synchronize the time with the NTP server;
- 0xC004F035 and 0xC004F059 (The software licensing service reported that the computer could not be activated with a Volume license key. Volume-licensed systems require upgrading from a qualified operating system. Please contact your system administrator or use a different type of key) — these errors may occur on computers running OEM versions of Windows. There is a special ACPI_SLIC table in the BIOS. The KMS server can’t find a special token in such a table and cannot activate Windows. In such cases, it is recommended to update (flash) the BIOS firmware.
You can use the Slui.exe tool to display a description of most activation related error codes (use the syntax: slui.exe 0x2a ErrorCode). For example, to get a more detailed description of activation error 0xC004F074, use the following command:
slui.exe 0x2a 0xC004F074
The error description contains detailed information:
Windows Activation
Code:
0xC004F074
Description:
The Software Licensing Service reported that the product could not be activated. No Key Management Service (KMS) could be contacted. Please see the Application Event Log for additional information.
You can also view all activation-related events in the Event Viewer application log under the provider’s name Microsoft-Windows-Security-SPP.
Cyril Kardashevsky
I enjoy technology and developing websites. Since 2012 I’m running a few of my own websites, and share useful content on gadgets, PC administration and website promotion.
It can become quite frustrating when your operating system keeps asking you to activate it, even though it was working fine just a few days back. This is what happens when you are using a corporate PC that hasn’t been connected to the organization’s network for a re-activation of the Windows operating system.
Maybe because you are working from home or from a remote location, your OS has failed to reactivate itself because it cannot connect to the domain’s Key Management Service (KMS) server.
If you are here, it means that you already have an idea of what KMS is and why you need it, but we are still going to explain the basics and how it works for the rookies.
Table of Contents
What is a KMS Server
A KMS server is used to manage Microsoft product activation, which includes both Windows Servers and clients operating systems and Microsoft Office products, within an organization’s domain. It is used to activate the products which have been obtained through Volume Licensing.
The role of a KMS server needs to be installed on a Windows Server OS, which can then be activated (once) using a CSVLK, also known as the KMS Host Key. This key is purchased from Microsoft and used to activate the KMS server deployed within your domain. The KMS server can then activate multiple client operating systems, depending on your Microsoft licensing agreement.
The KMS Host Key can be found on the Microsoft Volume Licensing Service Center at the following location:
Microsoft Volume Licensing Service Center >> License >> Relationship Summary >> Product Keys
Of course, you must already have the host key purchased to find it at the said location.
Once the KMS server is activated, other clients on the domain then need to be configured to this KMS server so the products can be activated. For that, a public Generic Volume License Key (GVLK) needs to be installed on the clients, which is unique for each Windows edition. Once the GVLK is installed, you must tell your computer which KMS server to contact for activating your OS.
Remember when we said that the OS needs to “reactivate” itself after a few days? This is what a KMS server is about. With a KMS server, a client OS is only activated for 180 days. After that, the OS will show messages like “Activate Windows,” or “Your Windows license is expired” if the machine is unable to connect with the KMS server.
The client OS rechecks for activation with the KMS server every 7 days, and can reactivate an unlimited number of times. Once the KMS server is activated with a host key, it no longer sends out any information over the internet, enabling organizations to use the KSM server to activate as many licenses as required, regardless of their agreement with Microsoft. Of course, this violates the terms of the agreement, but no one knows about it except for the organization’s personnel.
KMS VS. MAK
Both KMS and Multiple Activation Keys (MAK) are forms of volume licenses but have different use cases. While KMS uses an internal organization’s server to activate client operating systems, a single MAK activation uses the same to activate multiple clients using Microsoft services over the internet.
Learn how to check if Windows is KMS or MAK activated.
Let us now show you how to activate a client Windows operating system using an already-deployed KMS server.
How to Activate Windows using KMS Server
You can adapt the following steps if you return to your organization’s network where the KMS server is deployed to activate/reactivate your Windows operating system.
The complete process involves the following steps:
- Apply a valid GVLK key to the client OS.
- Specify the address of the KMS server on the client OS.
- Activate OS.
If your OS was once activated and simply requires reactivation because you have not been connected to the KMS server for the past 180 days, then you probably do not need to install a new GVLK key or reassign a new KMS server. However, do perform these mentioned steps if you are unable to reactivate the OS using the existing KMS server.
Apply GVLK Key
The public GVLK key is unique for different editions of Windows but can be found online. You can use a GVLK key from this Microsoft KMS client activation page. Once you see the right key, copy it and then perform these steps:
-
Launch the Command Prompt with elevated privileges.
-
Now use the following cmdlet to install a GVLK key. Replace “XXXXX” with the key you have copied from the Microsoft KMS client activation page.
slmgr.vbs /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXXInstall GVLK key -
Now, wait for the key to be installed until you see the confirmation message.
Confirmation message
Once successfully installed, proceed to the next phase.
Add KMS Activation Server
Before you start to add a new KMS server, if your Windows was previously once activated, you can check if it can still find the KMS activation server on your organization’s domain in the DNS. This DNS entry is automatically created when a new KMS server is deployed on the network.
For that, begin by contacting your system administrator for the Fully Qualified Domain Name (FQDN) of the KMS server. Once you have that, proceed to perform these steps:
-
Open an elevated Command Prompt.
-
Now run the following cmdlet whilst replacing Address with the FQDN of the KMS server.
nslookup -q=SRV AddressLook for the KMS server
If you are unable to find any details regarding the KMS server, you can specify it manually using these steps:
-
Open Command Prompt with administrative rights.
-
Now run the following cmdlet while replacing Address with the FQDN for the new KMS server.
slmgr -skms AddressConfigure new KMS server -
Now, wait for a confirmation message confirming that the new KMS server has been configured.
Confirmation message
Once the new KMS server has been registered, it is now time to activate the client OS.
Activate Windows OS with KMS
A simple command in the Windows Command Line Interface (CLI) will now activate the operating system.
-
Run the following cmdlet in an elevated Command Prompt to activate the client operating system.
Slmgr.vbs /atoActivate Windows -
Now, wait for the “Product activated successfully” prompt.
Product activated successfully
Although the OS has been activated successfully, you can still confirm its activation status by running the following cmdlet:
slmgr.vbs /dli
That’s it! You have just activated your client operating system using a KMS server.
If you are an administrator yourself, you can also deploy a KMS server inside a domain using the following guide.
How to Deploy KMS Host Server on Windows Server 2022
As you may already be familiar with by now, the KMS host server needs to be activated using a CSVLK, which can be obtained from the Microsoft Volume Licensing Service Center. Once you have that, proceed with the following steps to deploy a KMS server on Windows Server 2022:
Note: Make sure that the Server has an active internet connection before you proceed.
-
Start by clicking Add roles and features in the Server Manager.
Add roles and features -
The “Add roles and features” wizard will now open. Click Next.
Click Next -
Select “Role-based or feature-based installation” and click Next.
Role-based installation -
Now select a server on your domain on which you want to install the KMS server on and click Next.
Select a server -
On the next page, check the box next to “Volume Activation Services.”
Volume Activation Services -
From the popup, leave the default settings and click Add features.
Add features -
Now back on the wizard, click Next.
Click Next -
On the Select features page, leave the default settings and click Next.
Click Next -
On the next page, click Next again.
Click Next -
On the Confirmation page, click Install.
Install selections -
Once the Volume Activation Services role and its features have been successfully installed, click Close to close the wizard.
Close wizard -
Now click on the Notifications button and then click Volume Activation Tools to configure KMS.
Volume Activation Tools -
The “Volume Activation Tools” wizard will now open. Here, select “Key Management Service (KMS)” and then specify the FQDN for the KMS server in the text field. When done, click Next.
Configure KMS details -
Now select “Install your KMS host key” and enter the CSVLK obtained from Microsoft Volume Licensing Service Center. When entered, click Commit.
Install KMS Host Key -
Now, wait for the confirmation screen for the KMS server to be activated. When it is, you may Close the wizard.
Once the KMS server has been deployed, you can now use the guide provided above to use this KMS server to activate the client Windows operating systems on your organization’s domain.
Final Thoughts
The Windows operating systems can have various types of product keys. However, to activate an OS using a KMS server, the OS needs to be using a volume or an enterprise license. A retail Windows product cannot e activated using a KMS server.
That said, KMS servers are mostly used by large organizations to save costs and activate as many Microsoft products as possible. Of course, technical teams can connect remote computers to the organization’s network via a VPN to activate them (if they are joined to the domain) using the KMS server.
Windows Server running the Volume Activation Services role can act as a KMS (Key Management Service) server, allowing you to activate computers with volume editions of the Windows Server and Windows 10/11 operating systems in a corporate network. In this article, we will show you how to install and configure KMS Host on Windows Server 2022, 2019, or 2016, and how to use it to activate Windows on client computers.
Contents:
- Install KMS Host Role on Windows Server
- Activate KMS Host Running Windows Server with CSVLK
- How to Activate Windows with a KMS License Server
For more information about Microsoft KMS activation, we recommend you start with the Microsoft KMS activation FAQ article.
Install KMS Host Role on Windows Server
To deploy your own KMS server, you must install the Volume Activation Services role on any of the hosts running Windows Server 2022, 2019, or 2016. If you already have a KMS host on Windows Server 2016 or Windows Server 2019, you can use this existing server (in this case, this section can be skipped). Clients running newer Windows Server 2022 and Windows 11 can be activated using such a KMS host.
- Install the Volume Activation Services role on your server from the Server Manager console or using the PowerShell command:
Install-WindowsFeature -Name VolumeActivation -IncludeAllSubFeature –IncludeManagementTools - Enable a Windows Firewall rule that allows clients to access the KMS server:
Enable-NetFirewallRule -Name SPPSVC-In-TCP(this will open port TCP 1688 on the server).
Activate KMS Host Running Windows Server with CSVLK
Next, you need to activate your KMS server with a personal CSVLK key (also called a KMS Host Key). Previously, CSVLK keys could be obtained from your account on the Microsoft VLSC website (Volume Licensing Service Center), but this has recently been moved to the Microsoft 365 Admin Center (MAC).
By default, KMS host keys are not available in the MAC personal account for open agreement users, instead, Multiple Activation Keys (MAC) are suggested. You can request the generation of a CSVLK key from Microsoft Technical Support using the special VLSC Support request form, which requires you to provide your agreement number, product name, the number of hosts you plan to activate with KMS, and the purpose of the KMS server deployment.
- Sign in to Microsoft 365 Admin Center and go to Billing -> Your products -> Volume licensing -> Downloads & keys -> Select your product -> View keys. Copy the KMS host key for Windows Server 2022;
You should always use the KMS Host Key for the maximum version of Windows Server that is available in your account. A KMS host that is activated with a more recent key will be able to activate all of the previous versions of Windows.
- Install a new KMS key on the server using the command:
slmgr /ipk <KMS_host_key_Windows_Server_2022>Tip. If the KMS host was enabled with a key for an earlier version of Windows Server, you must first remove the KMS host key:
slmgr /upk - Activate your KMS server against the Microsoft activation servers:
slmgr /ato(your server must have direct internet access during activation). Or you can activate the KMS host by phone (run the graphical Volume Activation Tools from the Server Manager); - To publish an SRV record in the DNS to allow clients to automatically discover the KMS host in the domain, run the command:
slmgr /sdns - Restart the Software Protection service:
Restart-Service -Name sppsvc - Ensure that your KMS server has been successfully activated. Run the command:
slmgr.vbs /dlvMake sure the result includes: Description =VOLUME_KMS_WS22 channeland License status =Licensed. - You will now be able to activate all supported versions of Windows on your KMS server, including Windows 11 and Windows Server 2022.
KMS hosts that are running Windows Server 2019 and 2016 and have a new KMS key installed (Windows Srv 2022 DataCtr/Std KMS), can be used to activate the latest builds of Windows Server 2022 and Windows 11. This requires that the hosts have the latest cumulative updates installed (via Windows Update or manually).
How to Activate Windows with a KMS License Server
A special GVLK (Generic Volume License) key must be installed on Windows computers to activate them against your KMS server. GVLK keys are public keys that indicate that this computer will be activated on the KMS server. Visit the Microsoft website for a complete list of client GVLK keys for all supported versions of Windows (https://learn.microsoft.com/en-us/windows-server/get-started/kms-client-activation-keys).
You can use PowerShell to find out the version and edition of Windows that is installed on your computer:
Get-ComputerInfo | select OsName
In this case, it is Windows 10 Pro. Find and copy the GVLK key for this OS version from the link above. In our example, the KMS Client Product Key for Windows 10 Pro is W269N-WFGWX-YVC9B-4J6C9-T83GX.
Install the GVLK key on the client computer using the command:
slmgr /ipk W269N-WFGWX-YVC9B-4J6C9-T83GX
If your computer is joined to the AD domain and a special SRV record has been published in DNS, Windows will automatically activate on the KMS host during startup.
The KMS server name and port on the client device can also be set manually:
slmgr /skms corp-kms1.woshub.com:1688
Run the following command to activate Windows on your KMS server:
slmgr /ato
Check the Windows activation status:
slmgr /dlv
In this case, the VOLUME_KMSCLIENT channel and License status: Licensed values indicate that the Windows OS on this computer is activated through the KMS server. The client is activated for 180 days and is automatically renewed every 7 days (if the KMS server can be reached).
You can also check the Windows activation status using the command:
Get-CimInstance SoftwareLicensingProduct -Filter "Name like 'Windows%'" | where { $_.PartialProductKey } | select Description, LicenseStatus
The evaluation version of Windows Server cannot be activated on KMS; you must first convert it to a full version according to the guide.
Инфраструктура KMS состоит из KMS-сервера, который активируется в Microsoft (эта операция выполняется один раз по телефону или онлайн) и клиентов KMS, отправляющих запросы на активацию на KMS сервер. В качестве клиентов KMS сервера могут выступать пользовательские и серверные ОС Microsoft и MS Office.
Сам KMS сервер активируется помощью специального корпоративного VLC ключа (KMS host key), получить который может каждый корпоративный клиент Microsoft на сайте корпоративного лицензирования (https://www.microsoft.com/Licensing/servicecenter/default.aspx). Операция активации KMS сервера разовая.
Количество активаций, производимых с помощью KMS-сервера, не ограничено. Также отметим, что информация о проведенных активациях и их количестве не передается за пределы организации.
KMS сервер может активировать клиентов в разных доменах, а также клиенты в рабочих группах.
При установке KMS сервера в DNS регистрируется специальная SRV (_VLMCS) запись (по этой DNS записи клиент может найти имя KMS сервера в домене). Для активации KMS клиента на нем должен быть указан специальный публичный ключ KMS, который называется GVLK ключом ( Generic Volume License Key- универсальный ключ многократной установки). После указания GVLK ключа, клиент KMS пытается найти в DNS SRV запись, указывающую на сервер KMS и пытается произвести активацию.
Требования, необходимые для внедрения KMS сервера:
Между клиентом и сервером KMS должен быть открыт порт 1688. При выполнении онлайн активации самого сервера KMS (выполняется один раз), с сервера KMS должны быть доступны сайты Microsoft по портам 80/443 (в изолированной среде сервер KMS можно активировать по телефону)
Активация продуктов на сервере KMS возможна только при удовлетворении следующих требований к минимальному количеству KMS клиентов (т.н. порог активации):
Клиентские ОС: 25
Серверные ОС: 5
MS Office: 5
Совет. При необходимости счетчик активаций на KMS сервере можно накрутить программно с помощью скрипта.
Компьютеры с активированными на KMS сервере продуктами должны для продления активации подключатся к корпоративной сети с KMS сервером как минимум раз в 180 дней. По истечении 180 дней активация «слетает»
Служба KMS не требовательна к ресурсам, поэтому эта роль может быть установлена на любой сервер. К службе KMS как правило не предъявляется требований высокой доступности. Если сервер KMS не доступен несколько часов (и даже дней), этот простой никак не скажется на работе предприятия.
Активация MS Office на KMS сервере
Для возможности активации продуктов MS Office на KMS сервере нужно установить специальное расширение Microsoft Office Volume License Pack (отличается в зависимости от версии MS Office)
После установки License Pack для MS Office, нужно установить корпоративный KMS ключ для Office ( VLK ключ) и выполнить активацию KMS сервера для Office.
Дополнительные утилиты
Для удобства управления KMS серверами и ключами можно установить специальную утилиту Volume Activation Management Tool (VAMT).
Утилита VAMT не является частью поставки ОС, входит в состав пакета Windows Assessment and Deployment Kit (ADK) и устанавливается отдельно.
Для работы VAMT требуется .NET Framework
В качестве БД VAMT используется SQL Server Express
Последняя доступная версия, VAMT 1, поддерживаеи все ОС Microsoft включая Windows 8.1 и Server 2012 R2
Рекомендации
KMS сервера для активации ОС и Office могут работать на одном сервере с ОС Windows Server.
Для пользователей, не подключающихся к корпоративной сети с KMS сервером как минимум раз в 180 дней, рекомендуется использовать MAK ключ (ключ многократной активации).
Распространенные ошибки при использование сервера KMS
Установка корпоративного ключа KMS (VLK ключа) на клиентах
Общий KMS ключ не соответствует версии ОС на активируемом хосте
Сервер KMS должен быть обновлён для поддержки активации последних версий продуктов Microsoft.
Если при попытке активации появляется ошибка 0xC004F074 – причиной может быть отсутствие SRV записи _VLMCS._tcp.winitpro.ru в DNS. Ее можно создать вручную или указать адрес KMS сервера вручную (команда указана ниже)
Ошибка 0xC004F038 говорит о том, что в вашей сети не набралось необходимого количества систем для активации
Основные команды управления активацией на клиенте KMS
Установка публичного KMS ключа на клиенте:slmgr /ipk
Задать KMS сервер и порт:slmgr /skms kms-server.winitpro.ru:1688
Активция ОС на KMS-сервере:slmgr /ato
Информация о статусе активации ОС:slmgr /dlv
Вся лицензионная информация (включая статус активации MS Office):slmgr /dlv all
Совет. Всплывающее окно с лицензионной информацией не прокручивается и не всегда помещается на экран. Вывод информации для удобства анализа можно перенаправить в текстовый файл:cscript.exe c:\windows\system32\slmgr.vbs /dlv all > c:\tmp\dlv.txt
Совет. В качестве одного из расширений технологии KMS стоит упомянуть еще один тип активации продуктов MS — Active Directory Based Activation (ADBA). ADBA позволяет автоматически активировать клиенты с ОС Windows 8, Windows Server 2012 и MS Office 2013, включенные в состав домена. В этом случае выделенный KMS сервер отсутствует, а активация завязан на расширении службы Active Directory.
Материалы взяты с http://winitpro.ru/index.php/2015/03/13/faq-po-kms-aktivacii-produktov-microsoft/
