Microsoft Key Management Services (KMS) Management Pack – Kevin Holman's Blog (2024)

Microsoft Key Management Services (KMS) Management Pack – Kevin Holman's Blog (1)

Quick Download: https://github.com/thekevinholman/Microsoft.KMS

Many customers still use KMS activation for on-prem deployments. This management pack will discover and monitor your KMS servers.

This MP supports KMS on Windows Server 2012 and later

Microsoft Key Management Services (KMS) Management Pack – Kevin Holman's Blog (2)

Discovers and Monitors:

  • KMS Servers

Key Monitoring Scenarios:

  • KMS Service
  • Idle Minutes Count
  • Low Activation Count
  • Initialization Failures
  • DNS Failures

Changes from the original Microsoft KMS MP:

  • Added discovery support out of the box for KMS on WS2016 and 2019 servers
  • Removed all manual reset monitors and switched to rules
  • Changed class design so source and path on alerts will contain the FQDN of the computer.
  • Renamed and reduced views to make it more useable
  • Changed discoveries and monitoring to more reasonable frequencies
  • Added number of samples (matchcount) to Service Monitor
  • Renamed and simplified MP Element IDs
  • Added basic logging to discovery scripts.
  • Note: This MP will still create config churn as I did not change the design where the MP classes discover properties that will change often. That will take a deeper redesign.

Troubleshooting:

  • The primary method of discovery is to search for a registry value “KeyManagementServiceListeningPort” in the following registry key: “HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform” If your KMS is not getting discovered – you can add that registry value. The default is REG_SZ with “1688”

Microsoft Key Management Services (KMS) Management Pack – Kevin Holman's Blog (3)

19 Comments

  1. Microsoft Key Management Services (KMS) Management Pack – Kevin Holman's Blog (4)

    Blake Mengotto

    November 21, 2022 at 9:10 pm

    Reply

    Kevin, did you make this? What was the motivation? I have the old native MP running and it is one of the largest discovery pigs of all management packs, and that is with aggressive discovery tuning.

    • Microsoft Key Management Services (KMS) Management Pack – Kevin Holman's Blog (5)

      Kevin Holman Post author

      November 21, 2022 at 9:22 pm

      Reply

      I did. Because I saw that MSFT pulled the original. And it was really poorly written anyway. I didn’t fix the config churn but changed some of how it worked. Made the defaults better. Deleted all the really bad stuff. Made it discover properly on 2012 and later (I think). Made the service monitor better. Changed anything manual reset monitor to a rule and deleted those awful monitors that should have never been invented. Renamed stuff to make sense and got rid of stuff that didn’t. Once you peel back the onion, you realize there wasn’t much in there to begin with. I’d love feedback\recommendations.

      • Microsoft Key Management Services (KMS) Management Pack – Kevin Holman's Blog (6)

        Dwayne

        February 28, 2023 at 11:32 pm

        Reply

        I did something similar when I built our last KMS box, as the old MP… well your right wasn’t very good and the discovery failed on anything that actually could do the kms role these days

        I do bet as always your solution is better than mine. So will have a looksee

        i ‘reassembled’ the MP, so to speak, from what i could pull from the system center wiki…

    • Microsoft Key Management Services (KMS) Management Pack – Kevin Holman's Blog (8)

      Kevin Holman Post author

      November 24, 2022 at 9:50 am

      Reply

      Yes once a day. Restart the Microsoft Monitoring service on the agent to make discovery run within 5 minutes. I tested on 2019 and it works here.

      The discovery is based on the existence of ONE of these registry values present in this key:

      SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\
      KeyManagementServiceVersion
      KeyManagementServicePort
      KeyManagementServiceListeningPort

      Check the registry and see if one of those exist.

      • Microsoft Key Management Services (KMS) Management Pack – Kevin Holman's Blog (9)

        Sandro

        November 25, 2022 at 3:20 am

        Reply

        ok, found the reg-keys unter the following path:

        Computer\HKEY_USERS\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\55c92734-d682-4d71-983e-d6ec3f16059f\de32eafd-aaee-4662-9444-c1befb41bde2

        not quite sure, if this is a normal behaviour or not (we did some inplace-upgrades in the past with our KMS?)

        • Microsoft Key Management Services (KMS) Management Pack – Kevin Holman's Blog (10)

          Sandro

          November 25, 2022 at 3:22 am

          Reply

          ignore my last post, wrong reg-keys. but did not find them on our envirnoment 🙁

      • Microsoft Key Management Services (KMS) Management Pack – Kevin Holman's Blog (11)

        Martin

        November 29, 2022 at 1:59 am

        Reply

        Hi Kevin!

        I have a question about discovery. We have workstation servers (outside the domain) that we monitor.
        I noticed that they have the registry value: “KeyManagementServicePort”. Dont ask me why. I guess they have been configured to use KMS in a different way than we traditional do for the domain servers.

        My question is if it is possible to override KeyManagementServicePort in the discovery?

        Right now the Workstations servers shows up as KeyManagement Servers under the KMS “Server Role State” and in the “KMS Version” column the portnumber shows up.

        • Microsoft Key Management Services (KMS) Management Pack – Kevin Holman's Blog (12)

          Kevin Holman Post author

          November 29, 2022 at 8:29 am

          Reply

          Bummer! Ok, I will have to fix that. Let me look into it

        • Microsoft Key Management Services (KMS) Management Pack – Kevin Holman's Blog (13)

          Kevin Holman Post author

          November 29, 2022 at 12:43 pm

          Reply

          Ok, fixed. Your KMS servers MUST have “HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\KeyManagementServiceListeningPort” registry value now.

          • Microsoft Key Management Services (KMS) Management Pack – Kevin Holman's Blog (14)

            Martin

            November 30, 2022 at 1:23 am

            Yes we have the registry value. Now it works perfect. Good work Kevin!

  2. Microsoft Key Management Services (KMS) Management Pack – Kevin Holman's Blog (15)

    Saiyad Rahim

    November 30, 2022 at 9:42 pm

    Reply

    Hi Kevin,
    I haven’t seen (original) MP and wondered why there was no MP for KMS.
    Does this have ability to Alert on Servers in the environment that are/have not Activated based on a time period?

    • Microsoft Key Management Services (KMS) Management Pack – Kevin Holman's Blog (16)

      Dwayne

      February 28, 2023 at 11:37 pm

      Reply

      should just be an event log monitor on the target windows server(s) to check for the activation services use the ‘missing event detection’

      just find a valid activation event in the event logs and set that up to alert if not seen in your desired timeframe.

      alerting on fails could trigger if activation is attempted during patching of your KMS box.

  3. Microsoft Key Management Services (KMS) Management Pack – Kevin Holman's Blog (17)

    Joe

    January 20, 2023 at 10:25 am

    Reply

    Hi Kevin

    Basic question how do I actually run this tool on a sever?

    thanks

  4. Microsoft Key Management Services (KMS) Management Pack – Kevin Holman's Blog (18)

    Martin

    March 22, 2023 at 9:40 am

    Reply

    Hi Kevin!

    We get the alert “KMS Idle Time Monitor Alert” when we think we should not.
    We have overrided the Threshold (minutes) from 720 minutes to 1440, that is 24 hours.
    When we checking the KMS server for the 12290 event we can see that it´s only being idle for 4 hours.

    So we think it is strange that we get thoose alerts.
    Are we missing anything or do you have any thoughts about it?

    • Microsoft Key Management Services (KMS) Management Pack – Kevin Holman's Blog (19)

      Manuel

      May 1, 2023 at 7:17 am

      Reply

      We’re experiencing exactly the same problem. Did the same overrides and the Alert keeps triggering even tough the KMS (Event 12290) was never idle for more than 6 hours.

      Did you have any luck fixing it thus far, Martin?

  5. Microsoft Key Management Services (KMS) Management Pack – Kevin Holman's Blog (20)

    Martin

    May 17, 2023 at 2:04 pm

    Reply

    Hi Manuel

    No were unfortunately still stuck with that issue…

  6. Microsoft Key Management Services (KMS) Management Pack – Kevin Holman's Blog (21)

    AndresP

    June 29, 2023 at 1:07 am

    Reply

    On little remark – discovered that removing Volume Activation Service role didnt remove regkey KeyManagementServiceListeningPort – so it was still discovered as KMS server. Not directly related to MP – but may be help people who discover KMS in unexpected servers.

  7. Microsoft Key Management Services (KMS) Management Pack – Kevin Holman's Blog (22)

    Martin

    September 12, 2023 at 6:54 am

    Reply

    Now i think i´ve finally figured out why we get the alert “KMS Idle Time Monitor Alert”.
    Under “Product State” i found that they have left “one old product” that is not actual anymore. So idle time for this product, causes the “KMS Idle Time Monitor Alert”.

Leave a Reply

Microsoft Key Management Services (KMS) Management Pack – Kevin Holman's Blog (2024)

FAQs

Is KMS Windows key safe? ›

KMS is a legitimate way to activate Windows licenses in client computers, especially en masse (volume activation). There is even a Microsoft document on creating a KMS activation host. A KMS client connects to a KMS server (the activation host), which contains the host key the client uses for activation.

What is Microsoft Key Management Service? ›

KMS (Key Management Service) is one of the methods to activate Microsoft Windows and Microsoft Office. Activation ensures that the software is obtained from and licensed by Microsoft. KMS is used by volume license customers, usually medium to large businesses, schools, and non-profits.

How long does a key management service KMS activation last? ›

KMS activations are valid for 180 days, a period known as the activation validity interval. KMS clients must renew their activation by connecting to the KMS host at least once every 180 days to stay activated. By default, KMS client computers attempt to renew their activation every seven days.

How do I remove KMS activation from Microsoft Office? ›

Open the Start menu - Settings - Apps, enter the name of the software with "KMS" or similar in the search box in the list of apps, and click the software name in the search results to uninstall it.

Is KMS auto illegal? ›

KMS Activator is not a malware. But it depends from where you download it. Since it is widely used to (illegally) activate Windows and Microsoft Office products, crooks often embed malware inside.

How do I get rid of KMS virus? ›

To uninstall KMS on Windows 10, you can use the following steps:
  1. Open an elevated command prompt. ...
  2. Run the following command to stop the KMS service: net stop sppsvc.
  3. Run the following command to uninstall KMS: slmgr.vbs /upk.
  4. Restart the computer for the changes to take effect.
Aug 20, 2022

Is KMS activation legal? ›

Activation servers (KMS) through an organization or educational institution is legal, and should be used for those intents and purposes.

Is KMS activation permanent? ›

KMS activations are valid for 180 days (the activation validity interval). To remain activated, KMS client computers must renew their activation by connecting to the KMS host at least once every 180 days.

How do I disable KMS key management service? ›

Enabling and disabling KMS keys (console)
  1. To change the AWS Region, use the Region selector in the upper-right corner of the page.
  2. In the navigation pane, choose Customer managed keys.
  3. Choose the check box for the KMS keys that you want to enable or disable.
  4. To enable a KMS key, choose Key actions, Enable.

Can you delete a KMS key immediately? ›

Because it is destructive and potentially dangerous to delete a KMS key, AWS KMS requires you to set a waiting period of 7 – 30 days.

What happens when KMS activation expires? ›

It starts a 30-day grace period and notifies the user of this change. If the machine is not activated against the KMS after the 30-day grace period expires, it will enter a reduced functionality mode until it is able to connect to its KMS.

How much does it cost to disable KMS key? ›

Creating a custom KMS Customer Master Key (CMK) within your AWS account, whether enabled or disabled, incurs a monthly charge of $1 until the key is deleted. Since inactive keys are no longer being used but are still being charged, it is advisable to remove them to optimize your AWS costs.

How do I find out which KMS server is being used? ›

Run the command slmgr /dlv (for Windows) or ospp. vbs /dstatus (for Office). This command will show special licensing facts, which includes the KMS server in case your gadget is activated the usage of KMS.

Is KMS activation safe for Office? ›

Risk of Compromise: When you activate Windows and Office programs through an unknown KMS host server, you put your device at risk of being compromised. The host server could potentially be malicious and perform unauthorized activities on your device [1].

How do you check if you have a KMS server? ›

To find your KMS (Key Management Server) server, you can follow these steps:
  1. Open a command prompt on your Windows computer.
  2. Run the following command: nslookup -type=srv _vlmcs._tcp. ...
  3. Review the output of the command.

Is it safe to activate Office with KMS? ›

Generally, it is not safe to activate Windows and Office with a KMS host server unknown to you. The host server puts your device on at risk of being compromised and malicious activities. However, if you use an official Volume License, then it is much safer because it is regulated.

Why is KMS detected as a virus? ›

KMSPico is not a legitimate tool and is developed by cyber criminals, rather than the Microsoft corporation. Therefore, using this tool violates Windows Operating System terms and conditions. In addition, it is often distributed by dubious websites containing malicious content.

Are Windows generic keys safe? ›

Yes, generic keys are free to use and are sometimes used for troubleshooting. 3 people found this answer helpful. Yes, that's a Windows 10 Pro edition generic product key you can use for sure.

Is KMS Windows activation safe on Reddit? ›

I get it but heed this warning: DO NOT USE KMSPico. You will see articles or even Reddit posts that have it as a recommendation such as one post on r/piracy. But after testing the software in a sandbox VM to see just what happens under the hood, I can tell you it is NASTY!

Top Articles
Latest Posts
Article information

Author: Pres. Lawanda Wiegand

Last Updated:

Views: 5598

Rating: 4 / 5 (71 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Pres. Lawanda Wiegand

Birthday: 1993-01-10

Address: Suite 391 6963 Ullrich Shore, Bellefort, WI 01350-7893

Phone: +6806610432415

Job: Dynamic Manufacturing Assistant

Hobby: amateur radio, Taekwondo, Wood carving, Parkour, Skateboarding, Running, Rafting

Introduction: My name is Pres. Lawanda Wiegand, I am a inquisitive, helpful, glamorous, cheerful, open, clever, innocent person who loves writing and wants to share my knowledge and understanding with you.