Kms server для windows server 2008

Прочитано: 5 454

Сегодня я составлю шпаргалку по развертыванию сервиса в задачи которого будет входить активация рабочих систем в организации, а именно используемых у офисных сотрудников Windows 7 Professional SP1 и офисного пакета Microsoft Office 2010. Ранее когда я только получал настоящий уровень работы с системами Windows в компании «Спортмастер» в качестве Windows администратора данный сервис был мною задействован и оценен, как инструмент экономящий и время и силы. Раз настроив, сервис будет принимать от клиентский рабочих мест запросы проверки получения ответа, что у меня срок активации истек и что мне делать. Данный сервис именуется, как KMS (Key Management Service) — служба управления ключами посредством которой и происходит активация корпоративных версий Windows и в дополнение к этому попадают и серверные операционные системы Windows Server 2008 / R2. Такой сервис советую поднимать на станции которая выполняет одну и или две задачи и настроена правильно и лично Вами дабы не пришлось ее переустанавливать.

На заметку: чтобы сервис активировался, к нему должны подключиться 25 клиентский рабочих станций и 5 серверов тогда он перейдет в полный режим активации. Если лень ждать когда это произойдет, то можно воспользоваться Virtualbox и разворачивать клонированные VM, а после делать sysprep для подготовки.

Все дальнейшие действия будут рассмотрены на системе (к примеру DC,FileServer и т.д) под управлением Windows Server 2008 R2 SP1 Enterprise.

На заметку: У меня в наличии ключ класса «B»

Далее порядок по установке:

Шаг №1: Систему с осью Windows Server 2008 R2 SP1 Enterprise нужно активировать: <МОЙ_КЛЮЧ>

Шаг №2: Первое на рабочих станциях и серверах обязательно должно быть установлено обновление: KB2757817, либо вручную (Необходимы права Администратора), либо централизованно через сервер обновлений:

C:\Users\Administrator>wusa.exe Windows6.1-KB2757817-x64.msu /norestart /quiet

Шаг №3: После серверную станцию следует перезагрузить.

Шаг №4: Активирую правило в Firewall на сервере где разворачиваю KMS сервис:

C:\Users\Administrator>netsh advfirewall firewall set rule name="Key ManagementService (TCP-In)" new enable=yes

Updated 1 rule(s).

Ok.

После делаю рестарт службы: Software Protection

C:\Users\Administrator>net stop sppsvc

C:\Users\Administrator>net start sppsvc

Шаг №5: Устанавливаю ключ узла KMS на выделенный сервер связанный с определенной группой выпусков Windows (у меня ключ для Windows 7 & Server 2008 R2), запускаю командную строку с правами Администратора:

C:\Users\Administrator>slmgr /ipk <KMS_KEY_CLASS_B>

через мгновение ответ от мастера:

Installed product key <KMS_KEY_CLASS_B> successfully.

Шаг №6: Проверяю что ключ действительно установился:

C:\Users\Administrator>slmgr /dli

После окончания установки входим в систему и убеждаемся в том, что она сконфигурирована как KMS-сервер…

Шаг №7: Активирую узел KMS на разворачиваемой станции с данным сервисом KMS: (Командная строка запущена с правами Администратора)

C:\Users\Administrator>slmgr /ato

Activating Windows Server (R), ServerEnterprise edition

(идентификатор_сервера)

Product activated successfully.

Шаг №8: А теперь также для продуктов Office 2010 также указываю KMSключ (у меня для редакции: «Профессиональный плюс»)

Таблица версий продуктов Office 2010

,скачиваю Microsoft Office 2010 KMS Host License Pack и устанавливаю в систему:

Microsoft Office 2010 KMS Host licenses installed successfully.

Would you lik to enter a Microsoft Office 2010 KMS host product key and proceed with Internet activation now? – Отвечаю Yes, на запрос:

Enter the Microsoft Office 2010 KMS host Product key below. Your Must include dashes: – указываю Ключ: <KMS_KEY_OFFICE_2010>, через некоторое время мастер сообщает:

Microsoft Office 2010 KMS Host product Key has been successfully installed and activated.

For KMS host configuration options, see Slmg.vbs

C:\Users\Administrator>netstat -a | findstr ":1688"

TCP 0.0.0.0:1688 srv-dc:0 LISTENING

Шаг №9: После для активации KMSсервиса нужно перезагрузить систему.

Шаг №10: Если в корпоративной локальной сети есть Active Directory то создаю DNSзапись развернутого сервиса на домен контроллере (если служба DNS на нем работает) чтобы рабочие места знали куда обращаться за лицензионным ключом.

Start – Control Panel – Administrative Tools – оснастка DNS – DNS → srv-dc → Forward Lookup Zones – polygon.local – и через правый клик мышью на данной зоне вызываю меню Other New Records → выбираю Service Location (SRV) и нажимаю по кнопке “Create Record…”, теперь создаю SRV запись:

  • Domain: polygon.local
  • Service: _VLMCS
  • Protocol: _tcp
  • Priority: 0
  • Weight: 0
  • Port Number: 1688
  • Host offering this service: srv-dc.polygon.local → указываем FQDN хоста где развернута KMS служба

После нажимаю OK.

Шаг №11: Проверяю, а есть ли теперь KMS сервис в локальной сети, т.е. надо найти SRV-запись в DNS под именем: _VLMCS, она и будет ссылаться на KMS-сервер:

C:\Users\Administrator> nslookup -q=srv _VLMCS._tcp.polygon.local

  • Server: srv-dc.polygon.local
  • Address: 10.9.9.1
  • _VLMCS._tcp.polygon.local SRV service location:
  • priority = 0
  • weight = 0
  • port = 1688
  • srv hostname = srv-dc.polygon.local
  • srv-dc.polygon.local internet address = 10.9.9.1

Как видно запись есть – все хорошо.

На заметку: для клиентских рабочих станций прежде чем они активирую свою систему Windows и пакет Office есть специальные требования:

  • Наличие правильной Time Zone (у меня (UTC +03:00) Волгоград, Москва, Санкт-Петербург (RTZ 2)
  • Синхронизированное время с сервером времени внутри локальной сети

Если условие выполняется, то в логах на сервере где поднята KMS служба: Start – Control Panel – Administrative Tools – Event View – Event Viewer (local) – Applications and Services Logs – Key Management Service появятся первые записи, что такая то станция с кодом 0x0 успешно произвела запрос на активации, а после была активирована:

An activation request has been processed.

Info:

0x0,5,214-0306-buh.polygon.local,8cc042ce-17b5-450b-96f7-d6ba7cf8c983,2016/10/06 14:59,0,5,0,9da2a678-fb6b-4e67-ab84-60dd6a9c819a

На этом собственно и все настройки, а что же это дает? – а то что клиентам KMS больше не надо напрягать Вас как системного администратора предоставлять доступ в интернет или звонить по телефону дабы активировать систему достаточно лишь подключиться к хосту KMS. Также удобно что не нужно бекапировать KMS, просто удаляем его и заново указываем ключ и активируем и все начинает работать.

На заметку: ключ KMS применительно к Office 2010 не привязан к архитектуре рабочей станции и может активировать, как x86 так и x64.

На заметку: ключи активации для рабочих станции, серверов и пакета Office 2010 обновляются каждую неделю у KMSсервера, а если нет возможности достучаться до KMSсервера, то работают без обновления ключей до 180 дней либо же 210 дней если смотреть на 30 дней в которые система переходит по прошествии 3 дней покуда не введен ключ активации при установке.

В дальнейших заметках я покажу как вручную активировать рабочие станции, серверные системы и пакет Office 2010, а также трудности с которыми мне пришлось столкнуться. А пока собственно и все, с уважением автор блога – Олло Александр (aka ekzorchik).

В данной статье расскажу о том, как можно активировать Windows 7 и R2 при помощи сервера KMS.

Вся информация о KMS активации продуктов Microsoft описана в этой статье

Во-первых, естественно, у вас должен быть установлен и активирован сервер KMS.

Проверить работоспособность сервера KMS можно при помощи следующих команд:

Cscript slmgr.vbs /dli

Cscript slmgr.vbs /dlv

Далее следует убедиться, что на системное время вашего компьютера и сервера активации совпадают. В идеале они должны синхронизироваться по протоколу NTP с одним сервером времени.

Как активировать Windows 7 при помощи KMS

Затем открываем командную строку с правами администратора и последовательно выполняем следующие команды (обязательно дождитесь окончания каждой команды). В том случае, если вы используете лицензию типа Volume (VL), то первую команду выполнять не нужно!

slmgr /ipk ххххх- ххххх — ххххх — ххххх — ххххх

slmgr /skms kms_server.winitpro.ru:1688

где kms_server.winitpro.ru – имя (ip адрес вашего сервера KMS)

ххххх- ххххх — ххххх — ххххх – ххххх, — ключ от вашей редакции Windows

Публичные GVLK ключи для Windows 7 и Windows Server 2008 R2

Данные ключи используются для того, чтобы изменить ключ ОС с версии MAK (локальный ключ) на KMS ключ:

Windows 7 Professional FJ82H-XT6CR-J8D7P-XQJJ2-GPDD4
Windows 7 Professional N MRPKT-YTG23-K7D7T-X2JMM-QY7MG
Windows 7 Enterprise 33PXH-7Y6KF-2VJC9-XBBR8-HVTHH
Windows 7 Enterprise N YDRBP-3D83W-TY26F-D46B2-XCKRJ
Windows 7 Enterprise E C29WB-22CC8-VJ326-GHFJW-H9DH4
Windows Server 2008 R2 HPC Edition FKJQ8-TMCVP-FRMR7-4WR42-3JCD7
Windows Server 2008 R2 Datacenter 74YFP-3QFB3-KQT8W-PMXWJ-7M648
Windows Server 2008 R2 Enterprise 489J6-VHDMP-X63PK-3K798-CPX3Y
Windows Server 2008 R2 for Itanium-Based Systems GT63C-RJFQ3-4GMB6-BRFB9-CB83V
Windows Server 2008 R2 Standard YC6KT-GKW9T-YTKYR-T4X34-R7VHC
Windows Web Server 2008 R2 6TPJF-RBVHG-WBW2R-86QPH-6RTM4

После задания ключа установки KMS, активация клиента KMS может быть выполнена при помощи элемента «Система» (System) на панели управления. Также можно активировать Windows на KMS сервере при помощи команды:

Slmgr.vbs /ato

С помощью указанных команд на сервере KMS также можно активировать и Windows 2008 Server Core.

Well I have had the pleasure of setting up a KMS server in our environment, and found that the documentation from Microsoft is somewhat confusing. In light of this I will write the steps I used to configure the first KMS server in our organisation for use with Windows Server, Windows client and Microsoft Office activation. These steps will only include the installation of 1 KMS server.

Installing first KMS Server

Below are the steps I used to install the KMS server. We determined that due to the number of client activations, and the capacity of our infrastructure we had no problems installing this server on our secondary domain controller. From here on we will call it DC2.

  1. Log onto https://www.microsoft.com/licensing/servicecenter/ and fetch your key: “Win Srv 2008 R2 Data Ctr/Itan KMS C” – Note your key may be similar, but either way it must end in either KMS B, or KMS C.
  2. On DC2 we run CMD with elevation
  3. Type slmgr /ipk xxxxx-xxxxx-xxxxx-xxxxx-xxxxx where the last section is the Key from your volume licensing website.
  4. Open “Windows Firewall with Advanced Security” via Start menu -> Administrative Tools.
  5. Under Inbound Rules scroll down to “Key Management Service (TCP-In)”, right click and select enable.
  6. Reboot the machine – note you can restart the Software Licensing service but I preferred to reboot it (seeing as the server was not in use for anything else)
    [code]net stop sppsvc && net start sppsvc[/code]
  7. Activate server after reboot. This can be done via the GUI or by executing the following command from an elevated command prompt:
    [code]slmgr.vbs /ato[/code]
  8. Enables automatic DNS publishing by the KMS host by entering the below command in an elevated command promt. Note this should already be enabled, but just in case, we execute the command.
    [code]slmgr /sdns[/code]

Now you are done installing your KMS server.Note this will provide activation for clients and/or servers depending on the KMS key you used to activate DC2. Office KMS activation will be covered in a later section.

I do recommend verifying that the SRV record in DNS is created. Note that you should have no problems with the automatic creation if you are using the vanilla install of AD and have no specific security restrictions in DNS. To verify that the DNS record has been created open up DNS and check. Refer to the screenshot below to see where it lives:

Installing Office KMS Host

As mentioned above we have determined that the one KMS box (DC2) is suitable to do all of our activations for Microsoft products, so now we have to configure the Office KMS host on DC2. To do this we do the following:

  1. Log onto https://www.microsoft.com/licensing/servicecenter/ and fetch your key: “Office 2010 Suites and Apps KMS” – Note your key may be similar. If unsure speak to your Microsoft Account Manager.
  2. Download the Office 2010 KMS Host License Pack from the Microsoft website: http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=97b7b710-6831-4ce5-9ff5-fdc21fe8d965. Its only 903kb so wont take too long.
  3. Execute KeyManagementServiceHost.exe from your existing KMS server> In our case its DC2. Follow the prompt to finish the setup process.
  4. When prompted enter the KMS key for Office 2010.

Thats it. Just as easy to setup. Now you are ready to activate Office 2010 with KMS. To help monitor this, please refer the the section below.

Administering the KMS server

I take it now you want to see whether it works and if clients can be activated. Now i will go into administering the KMS server, which will be quite brief as there is not much to it, and is really only there to aid in troubleshooting, and to have a sticky beak when implementing it. Once its running there is no real reason to keep going in and checking up on it.

All functions to view settings and make changes are done through the already used VBS script slmgr.vbs. To see all the commands simply run slmgr from the command prompt. Note to execute changes you will need elevated command prompt. You will see the following screens:

So the most common command that i used were:

Displays license information (KMS Activation Count)

[code]cscript slmgr.vbs /dli[/code]

Displays detailed license information

[code]cscript slmgr.vbs /dlv all[/code]

For Office specific information you can run the below command to get the info wanted:

[code]cscript slmgr.vbs /dlv bfe7a195-4f8f-4f0b-a622-cf13c7d16864[/code]

Note I add cscript to the front of the command so that the output stays within the command window, this lets me output/scroll if there is a lot of data where as the usual vbs dialog crops the output.

Configuring KMS Clients

By default, Volume Licensing edition of Windows Vista, Windows 7 , Windows Server 2008, and Windows Server 2008 R2 are KMS clients. If the computers the organisation wants to activate using KMS are using any of these operating systems and the network allows DNS auto-discovery, no further configuration is needed.

If required you can configure the KMS client to connect to a specific KMS host, use a specific port and disable KMS auto-discovery.

When deploying KMS clients using WAIK you can use 2 different methods to prepare the client:

  • SYSPREP – run Sysprep /generalize which will reset the activation timer along with removing SID and a few other settings. Read about this before actually using it.
  • Software License Manager – run slmgr.vbs /rearm in an elevated command prompt to reset the grace period back to 30 days. Note you can only perform this 3 times in total.

You can also manually force activation of the client by using the GUI from Control Panel -> System or by running slmgr /ato.

If you want to convert MAK installations of Windows or Office to KMS, you need to change their product key, and then reactivate. Use the below keys to perform this:

Operating system edition Product key
Windows 7
Windows 7 Professional FJ82H-XT6CR-J8D7P-XQJJ2-GPDD4
Windows 7 Professional N MRPKT-YTG23-K7D7T-X2JMM-QY7MG
Windows 7 Enterprise 33PXH-7Y6KF-2VJC9-XBBR8-HVTHH
Windows 7 Enterprise N YDRBP-3D83W-TY26F-D46B2-XCKRJ
Windows Server 2008 R2
Windows Server 2008 R2 HPC Edition FKJQ8-TMCVP-FRMR7-4WR42-3JCD7
Windows Server 2008 R2 Datacenter 74YFP-3QFB3-KQT8W-PMXWJ-7M648
Windows Server 2008 R2 Enterprise 489J6-VHDMP-X63PK-3K798-CPX3Y
Windows Server 2008 R2 for Itanium-Based Systems GT63C-RJFQ3-4GMB6-BRFB9-CB83V
Windows Server 2008 R2 Standard YC6KT-GKW9T-YTKYR-T4X34-R7VHC
Windows Web Server 2008 R2 6TPJF-RBVHG-WBW2R-86QPH-6RTM4
Office 2010 Suites
Office Professional Plus 2010 VYBBJ-TRJPB-QFQRF-QFT4D-H3GVB
Office Standard 2010 V7QKV-4XVVR-XYV4D-F7DFM-8R6BM
Office Home and Business 2010 D6QFG-VBYP2-XQHM7-J97RH-VVRCK
Office 2010 Stand-alone products
Access 2010 V7Y44-9T38C-R2VJK-666HK-T7DDX
Excel 2010 H62QG-HXVKF-PP4HP-66KMR-CW9BM
SharePoint Workspace 2010 QYYW6-QP4CB-MBV6G-HYMCJ-4T3J4
InfoPath 2010 K96W8-67RPQ-62T9Y-J8FQJ-BT37T
OneNote 2010 Q4Y4M-RHWJM-PY37F-MTKWH-D3XHX
Outlook 2010 7YDC2-CWM8M-RRTJC-8MDVC-X3DWQ
PowerPoint 2010 RC8FX-88JRY-3PF7C-X8P67-P4VTT
Project Professional 2010 YGX6F-PGV49-PGW3J-9BTGG-VHKC6
Project Standard 2010 4HP3K-88W3F-W2K3D-6677X-F9PGB
Publisher 2010 BFK7F-9MYHM-V68C7-DRQ66-83YTP
Word 2010 HVHB3-C6FV7-KQX9W-YQG79-CRY7T
Visio 2010
Visio Premium 2010 D9DWC-HPYVV-JGF4P-BTWQB-WX8BJ
Visio Professional 2010 7MCW8-VRQVK-G677T-PDJCM-Q8TCP
Visio Standard 2010 767HD-QGMWX-8QTDB-9G3R2-KHFGJ

You can convert Windows and Office from MAC to KMS using the GUI available, or you can use the following commands:

Windows
To install a KMS key, type slmgr.vbs /ipk KmsKey at a command prompt.
To active online, type slmgr.vbs /ato at a command prompt.
To activate by using the telephone, type slui.exe 4 at a command prompt.

Office
To install a KMS key, type ospp.vbs /inpkey:KmsKey at a command prompt.
To active online, type ospp.vbs /act at a command prompt.

Important Links

Here are the resources that I got most of the information I needed.

  • Deploying KMS Activation
    http://technet.microsoft.com/en-us/library/ff793409.aspx
  • How to install or Update KMS on Server 2008 for windows 7 and Server 2008 Support
    http://myitforum.com/cs2/blogs/jmarcum/archive/2009/10/29/142586.aspx
  • Plan volume activation of Office 2010
    http://technet.microsoft.com/en-us/library/ee624358.aspx
  • Deploy volume activation of Office 201
    http://technet.microsoft.com/en-us/library/ee624357.aspx
  • Troubleshoot volume activation for Office 2010
    http://technet.microsoft.com/en-us/library/ee624355.aspx
  • Tools to configure client computers in Office 2010
    http://technet.microsoft.com/en-us/library/ee624350.aspx

Признаться, когда сверху спустили распоряжение перевести офис на лицензионные Windows-рельсы, я подумал, что работы на день максимум. Но не тут-то было. Оказалось, что в сети практически невозможно найти инструкцию по установке официального KMS сервера, погребенную под тоннами мануалов по взлому активаций и установке пиратского KMS. Поиск в technet страдает неизвестной болезнью и постоянно подсовывает мне инструкции по установке KMS для Win2003 и Vista. Даже на Хабре практически ничего не было. Я решил исправить ситуацию.

Итак, вы стали счастливым обладателем KMS ключей для Win2008R2 и Win7. Обращаю ваше внимание на то, что ключ для Win2008R2 единый и для редакции Standart и для редакции Enterprise. Теперь необходимо поднять KMS-host в сети, и делать мы это будем в два приема. В качестве KMS должна выступать машина под управлением соответствующей операционной системы.

Подготовка

Вариант первый, идеологически правильный. Создаем в Active Directory группу безопасности (к примеру «KMS_hosts»), и добавляем туда будущий/будущие KMS-host. После чего идем в настройки главного DNS-сервера и в настройках безопасности разрешаем этой группе создание SRV-записей.

Вариант второй, если вы любите делать все руками или если ваш DNS не поддерживает динамическую регистрацию записей. Запускаем консоль управления DNS-сервером и выбираем Forward Lookup Zones в вашем домене. Из пункта меню «Action» консоли выбираем «Other New Records» и указываем «Service Location (SRV)». Создаем запись со следующими параметрами:

  • Service: _VLMCS
  • Protocol: _TCP
  • Port number: 1688
  • Host offering the service: <FQDN_of_KMS_Host>

В будущем, если по какой-либо причине вам придется добавлять/переносить KMS сервер, в первом случае вам будет достаточно отредактировать группу безопасности, а во втором добавить руками новую запись и удалить старую.

Установка

На сервере, на котором планируется установить KMS, запускаем командную строку от имени администратора (правой кнопкой мыши клик по иконке и выбор «Run as administrator»).

Вводим следующие команды:
slmgr.vbs /ipk [KmsKey] — установка полученного от Microsoft KMS-ключа. Внимание, это ключ именно для KMS сервера. Он дает возможность создать до 6 точек активации, каждую из которых можно реактивировать не более 10 раз. Если у вас все нуждающиеся в лицензировании компьютеры находятся в одной сети, использовать этот ключ более одного раза нет смысла.
slmgr.vbs /ato – запуск активации Windows через интернет
Если же доступа к интернет нет, запустите вместо предыдущей команды вот эту
slui.exe 4 – для активации по телефону

После этих действий статус Windows вашего KMS-hosta поменяется на «Активировано», а в DNS сервере в Forward Lookup Zones/_TCP появится SRV-запись c именем вашего KMS сервера. Если же запись не появилась, принудительно заставьте KMS сервер зарегистрироваться командой slmgr.vbs /sdns и перезапустите его.
Осталась мелочь – настроить брандмауэр. Несмотря на то, что Microsoft утверждает, что для нормального функционирования службы достаточно разрешить в настройках брандмауэра правило для трафика WMI, мне пришлось создавать дополнительное правило для открытия порта 1688.
В случае, если вам не нравится порт 1688, вы можете его изменить командой slmgr.vbs /sprt [Порт]. Правда вам придется также изменить SRV-запись в DNS, если вы создавали ее вручную и правило в брандмауэре.
Перезапускаем службу:
net stop sppsvc && net start sppsvc

И наконец, активация клиентов

Если клиентский Windows устанавливался со скачанного с Volume Licensing Service Center образа, все что нужно сделать – это в командной строке под правами администратора запустить команду slmgr.vbs /ato. Система сама найдет в DNS адрес KMS сервера, подключится к нему и оставит запрос на активацию. Напоминаю, что активация начнется после 5 запросов от серверов, или 25 запросов от клиентских операционных систем.

Если Windows зарегестрирован уже MAC ключем, или у вас стоит Retail версия операционной системы, то список необходимых команд увеличивается на одну:
slmgr.vbs /ipk [KmsSetupKey]
slmgr.vbs /ato
Здесь [KmsSetupKey] — это один из нижеприведенных ключей, сообразно редакции:

  • Windows 7 Professional — FJ82H-XT6CR-J8D7P-XQJJ2-GPDD4
  • Windows 7 Professional N — MRPKT-YTG23-K7D7T-X2JMM-QY7MG
  • Windows 7 Enterprise — 33PXH-7Y6KF-2VJC9-XBBR8-HVTHH
  • Windows 7 Enterprise N — YDRBP-3D83W-TY26F-D46B2-XCKRJ
  • Windows 7 Enterprise E — C29WB-22CC8-VJ326-GHFJW-H9DH4
  • Windows Server 2008 R2 HPC Edition — FKJQ8-TMCVP-FRMR7-4WR42-3JCD7
  • Windows Server 2008 R2 Datacenter — 74YFP-3QFB3-KQT8W-PMXWJ-7M648
  • Windows Server 2008 R2 Enterprise — 489J6-VHDMP-X63PK-3K798-CPX3Y
  • Windows Server 2008 R2 for Itanium-Based Systems — GT63C-RJFQ3-4GMB6-BRFB9-CB83V
  • Windows Server 2008 R2 Standard — YC6KT-GKW9T-YTKYR-T4X34-R7VHC
  • Windows Web Server 2008 R2 — 6TPJF-RBVHG-WBW2R-86QPH-6RTM4

Hints:

  1. Узнать количество запросов на активацию можно, запустив на KMS сервере команду slmgr.vbs /dli С помощью этой же команды, запущенной на клиентском компьютере, можно узнать состояние и тип лицензии на нем.
  2. Software Licensing Service (slmgr.vbs) может быть запущен удаленно:
    slmgr.vbs TargetComputerName [username] [password] /parameter [options]
  3. Если по какой-либо причине вы не хотите публиковать адрес KMS сервера в DNS, то этот функционал можно отключить на сервере командой slmgr.vbs /cdns, а на клиентских компьютерах вручную указывать KMS сервер командой slmgr.vbs /skms [KmsHostName:port]
  4. Если клиентский компьютер был «навечно затриален» с помощью запрета доступа к файлу sppcomapi.dll, то перед активацией необходимо вернуть права к исходным:
    takeown /F %WINDIR%\System32\sppcomapi.dll
    icacls %WINDIR%\System32\sppcomapi.dll /grant *S-1-1-0:F



  • Star

    (456)


    You must be signed in to star a gist



  • Fork

    (173)


    You must be signed in to fork a gist

  • Clone this repository at &lt;script src=&quot;https://gist.github.com/jerodg/502bd80a715347662e79af526c98f187.js&quot;&gt;&lt;/script&gt;

  • Save jerodg/502bd80a715347662e79af526c98f187 to your computer and use it in GitHub Desktop.

Clone this repository at &lt;script src=&quot;https://gist.github.com/jerodg/502bd80a715347662e79af526c98f187.js&quot;&gt;&lt;/script&gt;

Save jerodg/502bd80a715347662e79af526c98f187 to your computer and use it in GitHub Desktop.

Activate Windows and Office Using KMS Server

Microsoft Windows and Office KMS Setup

Table of Contents

  • 1. Select Appropriate KMS Key
    • 1.1. Windows Server 2008-2022
    • 1.2. Windows 11
    • 1.3. Windows 10
    • 1.4. Windows 8
    • 1.5. Windows 7
    • 1.6. Windows Vista
    • 1.7. Office 2021
    • 1.8. Office 2019
    • 1.9. Office 2016
    • 1.10. Office 2013
    • 1.11. Office 2010
  • 2. Windows KMS Setup
    • 2.1. Install KMS Key
  • Remove Product Key
    • Configure KMS Client
    • Activate
  • 3. Office KMS Setup
    • 3.1. Install KMS Key
    • 3.2. Configure KMS Client
    • 3.3. Activate
  • 4. Reference

Author Jerod Gawne [jerodgawne@gmail.com]
Date February 22, 2018 Revision 2.1.0, March 26, 2024
Tags windows, kms, office
Links GitHubGist

Note

These keys are part of the public domain and are available directly from Microsoft.
These require you to have a KMS server running within reach of the system you’re trying to activate.
These can not be used to pirate software.

1. Select Appropriate KMS Key

1.1. Windows Server 2008-2022

Table 1. Windows Server 2022

Product

KMS Key

Windows Server 2022 Datacenter

WX4NM-KYWYW-QJJR4-XV3QB-6VM33

Windows Server 2022 Datacenter Azure Edition

NTBV8-9K7Q8-V27C6-M2BTV-KHMXV

Windows Server 2022 Standard

VDYBN-27WPP-V4HQT-9VMD4-VMK7H

Windows Server 2022 Standard

VDYBN-27WPP-V4HQT-9VMD4-VMK7H

Table 2. Windows Server 2019

Product

KMS Key

Windows Server 2019 Datacenter

WMDGN-G9PQG-XVVXX-R3X43-63DFG

Windows Server 2019 Essentials

WVDHN-86M7X-466P6-VHXV7-YY726

Windows Server 2019 Standard

N69G4-B89J2-4G8F4-WWYCC-J464C

Table 3. Windows Server, versions 20H2, 2004, 1909, 1903, and 1809

Windows Server Datacenter

6NMRW-2C8FM-D24W7-TQWMY-CWH2D

Windows Server Standard

N2KJX-J94YW-TQVFB-DG9YT-724CC

Table 4. Windows Server, version 1803

Product

KMS Key

Windows Server Datacenter

2HXDN-KRXHB-GPYC7-YCKFJ-7FVDG

Windows Server Standard

PTXN8-JFHJM-4WC78-MPCBR-9W4KR

Table 5. Windows Server, version 1709

Product

KMS Key

Windows Server Datacenter

6Y6KB-N82V8-D8CQV-23MJW-BWTG6

Windows Server Standard

DPCNP-XQFKJ-BJF7R-FRC8D-GF6G4

Table 6. Windows Server 2016

Product

KMS Key

Windows Server 2016 Datacenter

CB7KF-BWN84-R7R2Y-793K2-8XDDG

Windows Server 2016 Essentials

JCKRF-N37P4-C2D82-9YXRT-4M63B

Windows Server 2016 Standard

WC2BQ-8NRM3-FDDYY-2BFGV-KHKQY

Table 7. Windows Server 2012 R2

Product

KMS Key

Windows Server 2012 R2 Datacenter

W3GGN-FT8W3-Y4M27-J84CP-Q3VJ9

Windows Server 2012 R2 Essentials

KNC87-3J2TX-XB4WP-VCPJV-M4FWM

Windows Server 2012 R2 Server Standard

D2N9P-3P6X9-2R39C-7RTCD-MDVJX

Table 8. Windows Server 2012

Product

KMS Key

Windows Server 2012 Country Specific

4K36P-JN4VD-GDC6V-KDT89-DYFKP

Windows Server 2012 Datacenter

48HP8-DN98B-MYWDG-T2DCC-8W83P

Windows Server 2012 MultiPoint Premium

XNH6W-2V9GX-RGJ4K-Y8X6F-QGJ2G

Windows Server 2012 MultiPoint Standard

HM7DN-YVMH3-46JC3-XYTG7-CYQJJ

Windows Server 2012 N

8N2M2-HWPGY-7PGT9-HGDD8-GVGGY

Windows Server 2012 Server Standard

XC9B7-NBPP2-83J2H-RHMBY-92BT4

Windows Server 2012 Single Language

2WN2H-YGCQR-KFX6K-CD6TF-84YXQ

Windows Server 2012

BN3D2-R7TKB-3YPBD-8DRP2-27GG4

Table 9. Windows Server 2008 R2

Product

KMS Key

Windows Server 2008 R2 Web

6TPJF-RBVHG-WBW2R-86QPH-6RTM4

Windows Server 2008 R2 HPC edition

TT8MH-CG224-D3D7Q-498W2-9QCTX

Windows Server 2008 R2 Standard

YC6KT-GKW9T-YTKYR-T4X34-R7VHC

Windows Server 2008 R2 Enterprise

489J6-VHDMP-X63PK-3K798-CPX3Y

Windows Server 2008 R2 Datacenter

74YFP-3QFB3-KQT8W-PMXWJ-7M648

Windows Server 2008 R2 for Itanium-based Systems

GT63C-RJFQ3-4GMB6-BRFB9-CB83V

Table 10. Windows Server 2008

Product

KMS Key

Windows Server 2008 Datacenter

7M67G-PC374-GR742-YH8V4-TCBY3

Windows Server 2008 Datacenter without Hyper-V

22XQ2-VRXRG-P8D42-K34TD-G3QQC

Windows Server 2008 Enterprise

YQGMW-MPWTJ-34KDK-48M3W-X4Q6V

Windows Server 2008 Enterprise without Hyper-V

39BXF-X8Q23-P2WWT-38T2F-G3FPG

Windows Server 2008 HPC

RCTX3-KWVHP-BR6TB-RB6DM-6X7HP

Windows Server 2008 Standard without Hyper-V

W7VD6-7JFBR-RX26B-YKQ3Y-6FFFJ

Windows Server 2008 Standard

TM24T-X9RMF-VWXK6-X8JC9-BFGM2

Windows Server 2008 for Itanium-Based Systems

4DWFP-JF3DJ-B7DTH-78FJB-PDRHK

Windows Web Server 2008

WYR28-R7TFJ-3X2YQ-YCY4H-M249D

1.2. Windows 11

Table 11. Windows 11

Product

KMS Key

Windows 11 Education N

2WH4N-8QGBV-H22JP-CT43Q-MDWWJ

Windows 11 Education

NW6C2-QMPVW-D7KKK-3GKT6-VCFB2

Windows 11 Enterprise G N

44RPN-FTY23-9VTTB-MP9BX-T84FV

Windows 11 Enterprise G

YYVX9-NTFWV-6MDM3-9PT4T-4M68B

Windows 11 Enterprise N

DPH2V-TTNVB-4X9Q3-TJR4H-KHJW4

Windows 11 Enterprise

NPPR9-FWDCX-D2C8J-H872K-2YT43

Windows 11 Pro Education N

YVWGF-BXNMC-HTQYQ-CPQ99-66QFC

Windows 11 Pro Education

6TP4R-GNPTD-KYYHQ-7B7DP-J447Y

Windows 11 Pro N

MH37W-N47XK-V7XM9-C7227-GCQG9

Windows 11 Pro for Workstations N

9FNHH-K3HBT-3W4TD-6383H-6XYWF

Windows 11 Pro for Workstations

NRG8B-VKK3Q-CXVCJ-9G2XF-6Q84J

Windows 11 Pro

W269N-WFGWX-YVC9B-4J6C9-T83GX

1.3. Windows 10

Table 12. Windows 10, version 1709

Product

KMS Key

Windows 10 Professional Workstation

NRG8B-VKK3Q-CXVCJ-9G2XF-6Q84J

Windows 10 Professional Workstation N

9FNHH-K3HBT-3W4TD-6383H-6XYWF

Table 13. Windows 10

Product

KMS Key

Windows 10 Education N

2WH4N-8QGBV-H22JP-CT43Q-MDWWJ

Windows 10 Education

NW6C2-QMPVW-D7KKK-3GKT6-VCFB2

Windows 10 Enterprise 2015 LTSB N

2F77B-TNFGY-69QQF-B8YKP-D69TJ

Windows 10 Enterprise 2015 LTSB

WNMTR-4C88C-JK8YV-HQ7T2-76DF9

Windows 10 Enterprise 2016 LTSB N

QFFDN-GRT3P-VKWWX-X7T3R-8B639

Windows 10 Enterprise 2016 LTSB

DCPHK-NFMTC-H88MJ-PFHPY-QJ4BJ

Windows 10 Enterprise N

DPH2V-TTNVB-4X9Q3-TJR4H-KHJW4

Windows 10 Enterprise

NPPR9-FWDCX-D2C8J-H872K-2YT43

Windows 10 Professional N

MH37W-N47XK-V7XM9-C7227-GCQG9

Windows 10 Professional

W269N-WFGWX-YVC9B-4J6C9-T83GX

1.4. Windows 8

Table 14. Windows 8.1

Product

KMS Key

Windows 8.1 Enterprise

MHF9N-XY6XB-WVXMC-BTDCT-MKKG7

Windows 8.1 Enterprise N

TT4HM-HN7YT-62K67-RGRQJ-JFFXW

Windows 8.1 Professional N

HMCNV-VVBFX-7HMBH-CTY9B-B4FXY

Windows 8.1 Professional

GCRJD-8NW9H-F2CDX-CCM8D-9D6T9

Table 15. Windows 8

Product

KMS Key

Windows 8 Enterprise

32JNW-9KQ84-P47T8-D8GGY-CWCK7

Windows 8 Enterprise N

JMNMF-RHW7P-DMY6X-RF3DR-X2BQT

Windows 8 Professional

NG4HW-VH26C-733KW-K6F98-J8CK4

Windows 8 Professional N

XCVCF-2NXM9-723PB-MHCB7-2RYQQ

1.5. Windows 7

Table 16. Windows 7

Product

KMS Key

Windows 7 Enterprise

33PXH-7Y6KF-2VJC9-XBBR8-HVTHH

Windows 7 Enterprise E

C29WB-22CC8-VJ326-GHFJW-H9DH4

Windows 7 Enterprise N

YDRBP-3D83W-TY26F-D46B2-XCKRJ

Windows 7 Professional

FJ82H-XT6CR-J8D7P-XQJJ2-GPDD4

Windows 7 Professional E

W82YF-2Q76Y-63HXB-FGJG9-GF7QX

Windows 7 Professional N

MRPKT-YTG23-K7D7T-X2JMM-QY7MG

1.6. Windows Vista

Table 17. Windows Vista

Product

KMS Key

Windows Vista Business

YFKBB-PQJJV-G996G-VWGXY-2V3X8

Windows Vista Business N

HMBQG-8H2RH-C77VX-27R82-VMQBT

Windows Vista Enterprise N

VTC42-BM838-43QHV-84HX6-XJXKV

Windows Vista Enterprise

VKK3X-68KWM-X2YGT-QR4M6-4BWMV

1.7. Office 2021

Table 18. Office 2021

Product

KMS Key

Access LTSC 2021

WM8YG-YNGDD-4JHDC-PG3F4-FC4T4

Excel LTSC 2021

NWG3X-87C9K-TC7YY-BC2G7-G6RVC

Office LTSC Professional Plus 2021

FXYTK-NJJ8C-GB6DW-3DYQT-6F7TH

Office LTSC Standard 2021

KDX7X-BNVR8-TXXGX-4Q7Y8-78VT3

Outlook LTSC 2021

C9FM6-3N72F-HFJXB-TM3V9-T86R9

PowerPoint LTSC 2021

TY7XF-NFRBR-KJ44C-G83KF-GX27K

Project Professional 2021

FTNWT-C6WBT-8HMGF-K9PRX-QV9H8

Project Standard 2021

J2JDC-NJCYY-9RGQ4-YXWMH-T3D4T

Publisher LTSC 2021

2MW9D-N4BXM-9VBPG-Q7W6M-KFBGQ

Skype for Business LTSC 2021

HWCXN-K3WBT-WJBKY-R8BD9-XK29P

Visio LTSC Professional 2021

KNH8D-FGHT4-T8RK3-CTDYJ-K2HT4

Visio LTSC Standard 2021

MJVNY-BYWPY-CWV6J-2RKRT-4M8QG

Word LTSC 2021

TN8H9-M34D3-Y64V9-TR72V-X79KV

1.8. Office 2019

Table 19. Office 2019

Product

KMS Key

Access 2019

9N9PT-27V4Y-VJ2PD-YXFMF-YTFQT

Excel 2019

TMJWT-YYNMB-3BKTF-644FC-RVXBD

Office Professional Plus 2019

NMMKJ-6RK4F-KMJVX-8D9MJ-6MWKP

Office Standard 2019

6NWWJ-YQWMR-QKGCB-6TMB3-9D9HK

Outlook 2019

7HD7K-N4PVK-BHBCQ-YWQRW-XW4VK

PowerPoint 2019

RRNCX-C64HY-W2MM7-MCH9G-TJHMQ

Project Professional 2019

B4NPR-3FKK7-T2MBV-FRQ4W-PKD2B

Project Standard 2019

C4F7P-NCP8C-6CQPT-MQHV9-JXD2M

Publisher 2019

G2KWX-3NW6P-PY93R-JXK2T-C9Y9V

Skype for Business 2019

NCJ33-JHBBY-HTK98-MYCV8-HMKHJ

Visio Professional 2019

9BGNQ-K37YR-RQHF2-38RQ3-7VCBB

Visio Standard 2019

7TQNQ-K3YQQ-3PFH7-CCPPM-X4VQ2

Word 2019

PBX3G-NWMT6-Q7XBW-PYJGG-WXD33

1.9. Office 2016

Table 20. Office 2016

Product

KMS Key

Access 2016

GNH9Y-D2J4T-FJHGG-QRVH7-QPFDW

Excel 2016

9C2PK-NWTVB-JMPW8-BFT28-7FTBF

Office Professional Plus 2016

XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99

Office Standard 2016

JNRGM-WHDWX-FJJG3-K47QV-DRTFM

OneNote 2016

DR92N-9HTF2-97XKM-XW2WJ-XW3J6

Outlook 2016

R69KK-NTPKF-7M3Q4-QYBHW-6MT9B

PowerPoint 2016

J7MQP-HNJ4Y-WJ7YM-PFYGF-BY6C6

Project Professional 2016

YG9NW-3K39V-2T3HJ-93F3Q-G83KT

Project Standard 2016

GNFHQ-F6YQM-KQDGJ-327XX-KQBVC

Publisher 2016

F47MM-N3XJP-TQXJ9-BP99D-8837K

Publisher 2016

F47MM-N3XJP-TQXJ9-BP99D-8K837

Skype for Business 2016

869NQ-FJ69K-466HW-QYCP2-DDBV6

Visio Professional 2016

PD3PC-RHNGV-FXJ29-8JK7D-RJRJK

Visio Standard 2016

7WHWN-4T7MP-G96JF-G33KR-W8GF4

Word 2016

WXY84-JN2Q9-RBCCQ-3Q3J3-3PFJ6

1.10. Office 2013

Table 21. Office 2013

Product

KMS Key

Access 2013

NG2JY-H4JBT-HQXYP-78QH9-4JM2D

Excel 2013

VGPNG-Y7HQW-9RHP7-TKPV3-BG7GB

InfoPath 2013

DKT8B-N7VXH-D963P-Q4PHY-F8894

Lync 2013

2MG3G-3BNTT-3MFW9-KDQW3-TCK7R

Office 2013 Professional Plus

YC7DK-G2NP3-2QQC3-J6H88-GVGXT

Office 2013 Standard

KBKQT-2NMXY-JJWGP-M62JB-92CD4

OneNote 2013

TGN6P-8MMBC-37P2F-XHXXK-P34VW

Outlook 2013

QPN8Q-BJBTJ-334K3-93TGY-2PMBT

PowerPoint 2013

4NT99-8RJFH-Q2VDH-KYG2C-4RD4F

Project 2013 Professional

FN8TT-7WMH6-2D4X9-M337T-2342K

Project 2013 Standard

6NTH3-CW976-3G3Y2-JK3TX-8QHTT

Publisher 2013

PN2WF-29XG2-T9HJ7-JQPJR-FCXK4

Visio 2013 Professional

C2FG9-N6J68-H8BTJ-BW3QX-RM3B3

Visio 2013 Standard

J484Y-4NKBF-W2HMG-DBMJC-PGWR7

Word 2013

6Q7VD-NX8JD-WJ2VH-88V73-4GBJ7

1.11. Office 2010

Table 22. Office 2010

Product

KMS Key

Access 2010

V7Y44-9T38C-R2VJK-666HK-T7DDX

Excel 2010

H62QG-HXVKF-PP4HP-66KMR-CW9BM

InfoPath 2010

K96W8-67RPQ-62T9Y-J8FQJ-BT37T

Office Home and Business 2010

D6QFG-VBYP2-XQHM7-J97RH-VVRCK

Office Professional Plus 2010

VYBBJ-TRJPB-QFQRF-QFT4D-H3GVB

Office Standard 2010

V7QKV-4XVVR-XYV4D-F7DFM-8R6BM

OneNote 2010

Q4Y4M-RHWJM-PY37F-MTKWH-D3XHX

Outlook 2010

7YDC2-CWM8M-RRTJC-8MDVC-X3DWQ

PowerPoint 2010

RC8FX-88JRY-3PF7C-X8P67-P4VTT

Project Professional 2010

YGX6F-PGV49-PGW3J-9BTGG-VHKC6

Project Standard 2010

4HP3K-88W3F-W2K3D-6677X-F9PGB

Publisher 2010

BFK7F-9MYHM-V68C7-DRQ66-83YTP

SharePoint Workspace 2010

QYYW6-QP4CB-MBV6G-HYMCJ-4T3J4

Visio Premium 2010

D9DWC-HPYVV-JGF4P-BTWQB-WX8BJ

Visio Professional 2010

7MCW8-VRQVK-G677T-PDJCM-Q8TCP

Visio Standard 2010

767HD-QGMWX-8QTDB-9G3R2-KHFGJ

Word 2010

HVHB3-C6FV7-KQX9W-YQG79-CRY7T

2. Windows KMS Setup

2.1. Install KMS Key

Open an elevated command prompt (as administrator)

Remove Product Key

e.g. Windows 10 Enterprise

slmgr /upk
# Remove product key from registry
slmgr /cpky

slmgr.vbs /ipk NPPR9-FWDCX-D2C8J-H872K-2YT43

Configure KMS Client

Open an elevated command prompt (as administrator)

slmgr.vbs /skms <host>:<port>

3. Office KMS Setup

3.1. Install KMS Key

cd "C:\Program Files\Microsoft Office\Office16"
cscript ospp.vbs /inpkey:XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99

3.2. Configure KMS Client

cscript ospp.vbs /sethst:kms01.yourdomain.com
cscript ospp.vbs /setprt:1689  // Optionally set KMS Server Port

3.3. Activate

cscript ospp.vbs /act  // Activate
cscript ospp.vbs /dstatusall  // Optionally Check Current Status

4. Reference

  • IT Bros

  • Office 2016 Client Software License Management Tool

  • Micorosft Docs KMS Keys

  • Microsoft Docs KMS

  • Technet

  • Office 2021 GVLK

  • Windows 11 Keys

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Windows 10 домашняя установить бесплатно
  • Nmap как сканировать порты windows
  • Установите правильный порядок вызова стандартного файлового менеджера windows пуск
  • Как открыть порт 445 smb windows 10
  • Программа opendiag для windows