Table of Contents
Expected knowledge level:
- Microsoft Active Directory: Intermediate
- Microsoft Licensing: Intermediate
Microsoft Key Management Services (KMS) Installation
- Get a KMS Key from Microsoft Volume Licensing.
- KMS Key is missing from Download and Keys
- From Home Click on License
- Click on Relationship Summary
- Location Product and find the KMS License
- Install the Volume Activation Services role on your server from the Server Manager console or using the PowerShell command
1
| Install-WindowsFeature -Name VolumeActivation -IncludeAllSubFeature –Include ManagementTools
|
In order for the KMS client to contact the KMS server, you need to open incoming connections on TCP port 1688. If you use Windows Defender Firewall with Advanced Security service, then you can open the port by the following PowerShell command
1
| Enable-NetFirewallRule -Name SPPSVC-In-TCP
|
- Install the KMS key using the following command:
1
| slmgr /ipk <KMS_host_key>;
|
- Activate your KMS server with Microsoft activation servers:
On your clients, you can check the application event log under Windows Logs to monitor the activation process (Microsoft Windows Security Licensing SLC events 12288 and 12289)
Activate a Windows System to a KMS licensing Server
Prerequisite:
- Windows must have been installed from volume licensing (VL) media.
- Open Command Prompt as Administrator
Replace Product Key with KMS Client Key
Determine if a KMS Client key is installed
1
| cscript.exe %windir%\system32\slmgr.vbs -dlv
|
Example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
| cscript.exe %windir%\system32\slmgr.vbs /dlv
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.
Software licensing service version: 6.1.7601.17514
Name: Windows Server(R), ServerStandard edition
Description: Windows Operating System - Windows Server(R), VOLUME_MAK_B channel
Activation ID: 6a4xx364-4x60-4856-x727-xxb59x94348x
Application ID: 55x92734-x682-4x71-983x-x6xx3x16059x
Extended PID: 55041-00168-262-007970-03-1033-7601.0000-2592015
Installation ID: 000686421210080516113765299045296406480160539145993291
Processor Certificate URL: http://go.microsoft.com/fwlink/?LinkID=88342
Machine Certificate URL: http://go.microsoft.com/fwlink/?LinkID=88343
Use License URL: http://go.microsoft.com/fwlink/?LinkID=88345
Product Key Certificate URL: http://go.microsoft.com/fwlink/?LinkID=88344
Partial Product Key: 6XFXJ
License Status: Licensed
Remaining Windows rearm count: 2
Trusted time: 10/19/2017 10:36:06 PM
|
VOLUME_MAK_B channel in the description. That stands for Multiple Activation Key and is not a KMS client key.
Obtain a KMS Client Key
The KMS client keys are universal to all customers and a list of them can be found on the Microsoft TechNet/Doc web site
- Windows Server 2019, Windows Server Semi-Annual Channel, Windows Server 2016, Windows 10
- Windows Vista, Windows Server 2008, Windows 7, Windows Server 2008 R2, Windows Server 2012, Windows 8, Windows Server 2012 R2, Windows 8.1, Windows 10 and Windows Server 2016
- Windows Vista, Windows Server 2008, Windows 7 and Windows Server 2008 R2
Uninstall Current Key (Optional)
The Install command replaces the existing key.
1
| cscript.exe %windir%\system32\slmgr.vbs -upk
|
Install KMS Client Key
1
| cscript.exe %windir%\system32\slmgr.vbs -ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
|
Example for Windows 2008 R2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
| cscript.exe %windir%\system32\slmgr.vbs /ipk YC6KT-GKW9T-YTKYR-T4X34-R7VHC
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.
Installed product key YC6KT-GKW9T-YTKYR-T4X34-R7VHC successfully.
cscript.exe %windir%\system32\slmgr.vbs /dlv
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.
Software licensing service version: 6.1.7601.17514
Name: Windows Server(R), ServerStandard edition
Description: Windows Operating System - Windows Server(R), VOLUME_KMSCLIENT channel
Activation ID: 6a4xx364-4x60-4856-x727-xxb59x94348x
Application ID: 55x92734-x682-4x71-983x-x6xx3x16059x
Extended PID: 55041-00168-262-007970-03-1033-7601.0000-2592015
Installation ID: 005523267482241661889166696863115643258845745925188956
Partial Product Key: R7XXC
License Status: Notification
Notification Reason: 0xC004F056.
Remaining Windows rearm count: 2
Trusted time: 10/19/2017 10:49:25 PM
|
Please use slmgr.vbs /ato to activate and update KMS client information in order to update values.
Take note of the VOLUME_KMSCLIENT channel in the description.
Activate Client to KMS
1
2
3
4
5
6
7
8
| cscript.exe %windir%\system32\slmgr.vbs -ato
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.
Activating Windows Server(R), ServerStandard edition (68531fb9-5521-4989-98be-d11a0f55633f) ..
Product activated successfully.
|
Locate KMS (Key Management Service)
This article gives the steps to find out KMS - Key Management Service servers for a given domain from DNS.
Prerequisite
DNS publishing must be enabled on the KMS host server. Which is the default. (DO NOT RUN UNLESS YOU MIGRATING TO NEW SERVER)
Example
1
| cscript.exe %windir%\system32\slmgr.vbs /sdns
|
Steps
1
| nslookup -type=SRV _vlmcs._tcp.ad.davidmarker.com
|
Example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
| nslookup -type=SRV _vlmcs._tcp.ad.davidmarker.com
Server: DC01.ad.davidmarker.com
Address: 10.3.16.7
_vlmcs._tcp.ad.davidmarker.com SRV service location:
priority = 0
weight = 0
port = 1688
svr hostname = KMS01.ad.davidmarker.com
KMS01.ad.davidmarker.com internet address = 10.3.16.25
nslookup -type=SRV _vlmcs._tcp.dev.davidmarker.com
Server: DC01.ad.davidmarker.com
Address: 10.3.17.24
Non-authoritative answer:
_vlmcs._tcp.dev.davidmarker.com SRV service location:
priority = 0
weight = 0
port = 1688
svr hostname = KMS01.ad.davidmarker.com
KMS01.ad.davidmarker.com internet address = 10.3.16.25
nslookup -type=SRV _vlmcs._tcp.dmz.davidmarker.com
Server: DC01.ad.davidmarker.com
Address: 10.3.17.24
Non-authoritative answer:
_vlmcs._tcp.dmz.davidmarker.com SRV service location:
priority = 0
weight = 0
port = 1688
svr hostname = KMS01.ad.davidmarker.com
KMS01.ad.davidmarker.com internet address = 10.3.16.25
nslookup -type=SRV _vlmcs._tcp.davidmarker.com
Server: DC01.ad.davidmarker.com
Address: 10.3.17.24
Non-authoritative answer:
_vlmcs._tcp.davidmarker.com SRV service location:
priority = 0
weight = 0
port = 1688
svr hostname = KMS01.ad.davidmarker.com
KMS01.ad.davidmarker.com internet address = 10.3.16.25
nslookup -type=SRV _vlmcs._tcp.extranet.davidmarker.com
Server: DC01.ad.davidmarker.com
Address: 10.3.17.24
Non-authoritative answer:
_vlmcs._tcp.extranet.davidmarker.com SRV service location:
priority = 0
weight = 0
port = 1688
svr hostname = KMS01.ad.davidmarker.com
KMS01.ad.davidmarker.com internet address = 10.3.16.25
|
Determine if KMS Host Has Service Record in DNS
Determine an Active KMS Host Server on a Domain Through a DNS Query
Set KMS Server Manually (Skip if in DNS)
If your network does not support DDNS, you need to manually assign a KMS host to your KMS clients. Manually assigning a KMS host disables auto-discovery of KMS on a KMS client.
1
| cscript.exe %windir%\system32\slmgr.vbs -skms <kms fqdn>
|
Example
1
2
3
4
5
6
| cscript.exe %windir%\system32\slmgr.vbs -skms KMS01.ad.davidmarker.com
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.
Key Management Service machine name set to KMS01.ad.davidmarker.com successfully.
|
Static Registered KMS Server Example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
| cscript.exe %windir%\system32\slmgr.vbs -dlv
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.
Software licensing service version: 6.1.7601.17514
Name: Windows Server(R), ServerStandard edition
Description: Windows Operating System - Windows Server(R), VOLUME_KMSCLIENT channel
Activation ID: 6a4xx364-4x60-4856-x727-xxb59x94348x
Application ID: 55x92734-x682-4x71-983x-x6xx3x16059x
Extended PID: 55041-00168-262-007970-03-1033-7601.0000-2592015
Installation ID: 005523267482241661889166696863115643258845745925188956
Partial Product Key: R7VHC
License Status: Licensed
Volume activation expiration: 259200 minute(s) (180 day(s))
Remaining Windows rearm count: 1
Trusted time: 10/20/2017 12:17:38 AM
Key Management Service client information
Client Machine ID (CMID): fb19bdcb-1e57-4a4c-9f2b-55c9fafaa9f8
Registered KMS machine name: KMS01.ad.davidmarker.com:1688
KMS machine extended PID: 03612-00206-491-451936-03-1033-14393.0000-2922017
Activation interval: 120 minutes
Renewal interval: 10080 minutes
KMS host caching is enabled
|
Take note of the key name Registered KMS machine name.
Dynamic DNS Registered KMS Server Example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
| cscript.exe %windir%\system32\slmgr.vbs -dlv
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.
Software licensing service version: 6.1.7601.17514
Name: Windows Server(R), ServerStandard edition
Description: Windows Operating System - Windows Server(R), VOLUME_KMSCLIENT channel
Activation ID: 68531fb9-5511-4989-97be-d11a0f55633f
Application ID: 55c92734-d682-4d71-983e-d6ec3f16059f
Extended PID: 00477-00168-001-000042-03-1033-7601.0000-2922017
Installation ID: 005523267482241661889166696863115643258845745925188956
Partial Product Key: R7VHC
License Status: Licensed
Volume activation expiration: 259200 minute(s) (180 day(s))
Remaining Windows rearm count: 1
Trusted time: 10/20/2017 12:17:38 AM
Key Management Service client information
Client Machine ID (CMID): 6c18974a-732e-407e-9c57-d11a14d20066
Registered KMS machine name: KMS01.ad.davidmarker.com:1688
KMS machine extended PID: 55041-00168-313-058648-03-1033-7600.0000-1342010
Activation interval: 120 minutes
Renewal interval: 10080 minutes
KMS host caching is enabled
|
Take note of the KMS machine name from DNS.
Active Directory client KMS Server Example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
| cscript.exe %windir%\system32\slmgr.vbs /dlv
Microsoft (R) Windows Script Host Version 5.812
Copyright (C) Microsoft Corporation. All rights reserved.
Software licensing service version: 10.0.14393.351
Name: Windows(R), ServerStandard edition
Description: Windows(R) Operating System, VOLUME_KMSCLIENT channel
Activation ID: 6a4xx364-4x60-4856-x727-xxb59x94348x
Application ID: 55x92734-x682-4x71-983x-x6xx3x16059x
Extended PID: 55041-00168-262-007970-03-1033-7601.0000-2592015
Product Key Channel: Volume:GVLK
Installation ID: 740857130382855881761924531452724208539004624043301017044941284
Partial Product Key: KHKQY
License Status: Licensed
Volume activation expiration: 259154 minute(s) (180 day(s))
Remaining Windows rearm count: 1001
Remaining SKU rearm count: 1001
Trusted time: 10/19/2017 10:47:14 PM
Configured Activation Type: All
Most recent activation information:
AD Activation client information
Activation Object name: Windows(R) Operating System, VOLUME_KMS_WS16 channel
AO DN: CN=00206-491-451936-0,CN=Activation Objects,CN=Microsoft SPP,CN=Services,CN=Configuration,DC=ad,DC=davidmarker,DC=COM
AO extended PID: 03612-00206-491-451936-03-1033-14393.0000-2922017
AO activation ID: d6992aac-29e7-452a-bf10-bbfb8ccabe59
|
Take note of the KMS machine name from DNS.