Key Management Services (KMS)

Glenn Maxwell 12,336 Reputation points
2025-02-05T21:20:31.6266667+00:00

Hi All,

I have a KMS Host VM running on Windows Server 2016. This VM is hosted on Azure. However, I am unable to activate Windows Server 2022 servers using this KMS host. Windows Server 2019 and 2016 are activating successfully with this KMS host.

When I run the command cscript slmgr.vbs /dlv on the KMS host, the description shows: Windows(R) Operating Systems, VOLUME_KMS_WS19 channel. This indicates that the current KMS setup does not support activating Windows Server 2022 VMs. Therefore, I plan to upgrade my KMS host from Windows Server 2016 to Windows Server 2022.

I have a few queries regarding this upgrade:

  1. Backing up existing keys – Before upgrading my KMS host to Windows Server 2022, how can I back up the existing KMS keys?
  2. Installing the new KMS Host key – After the upgrade, how do I install the new KMS Host key? Will the new KMS Host key be available in my Volume Licensing Portal, or is it a generic key found on the Microsoft portal? This is unclear to me as i have never worked earlier on KMS.
  3. Are the following commands correct for installing and activating the new KMS Host key?
		slmgr.vbs /ipk <newkey>   (Installs the new KMS Host key)  

		slmgr.vbs /ato <newkey>   (Activates the new KMS Host key with Microsoft)  

  4. Verifying activation – How can I check whether all my Windows Server 2022, 2019, and    2016 VMs are successfully activating with the KMS host?
Windows Server 2019
Windows Server 2019
A Microsoft server operating system that supports enterprise-level management updated to data storage.
3,901 questions
Windows Server 2016
Windows Server 2016
A Microsoft server operating system that supports enterprise-level management updated to data storage.
2,574 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
13,681 questions
Windows Server Security
Windows Server Security
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Security: The precautions taken to guard against crime, attack, sabotage, espionage, or another threat.
1,902 questions
Windows Server Infrastructure
Windows Server Infrastructure
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Infrastructure: A Microsoft solution area focused on providing organizations with a cloud solution that supports their real-world needs and meets evolving regulatory requirements.
562 questions
0 comments No comments
{count} votes

Accepted answer
  1. Marcin Policht 35,210 Reputation points MVP
    2025-02-05T21:46:13.04+00:00
    1. Backing up existing KMS keys There isn't a direct way to "back up" KMS keys, but you can record your current KMS host key and activation information before proceeding. Run the following commands and save the output:
    • Check the installed KMS key:
        cscript slmgr.vbs /dlv
      
      Look for Product Key Channel and Partial Product Key.
    • Export the KMS activation count:
        cscript slmgr.vbs /dli
      
    • If you have any MAK keys installed on the KMS host, back them up manually by noting them down.

    Your KMS keys should also be available in the Volume Licensing Service Center (VLSC) under "Product Keys."

    1. Installing the new KMS host key After upgrading your KMS host to Windows Server 2022:
    • You will need to obtain a new KMS Host Key (CSVLK) from the VLSC.
    1. Installing and activating the new KMS host key Yes, the following commands are correct:
    cscript slmgr.vbs /ipk <new_kms_host_key>
    
    • This installs the new KMS Host key.
    cscript slmgr.vbs /ato
    
    • This activates the KMS Host with Microsoft.

    After activation, verify that the KMS service is running:

    cscript slmgr.vbs /dlv
    
    • Look for License Status: Licensed and KMS Host License Status: Licensed.
    1. Verifying activation of Windows Server 2022, 2019, and 2016 VMs After setting up your new KMS host, check whether your client VMs are activating:
    • On each Windows Server 2022/2019/2016 VM, run:
        cscript slmgr.vbs /ato
      
      • If activation is successful, the VM is now activated through your KMS host.
    • To check activation status:
        cscript slmgr.vbs /dli
      
      • This will show whether the server is activated via KMS.
    • To view KMS client requests on the KMS host:
        cscript slmgr.vbs /dlv
      
      • Look for "KMS Current Count" and ensure it's increasing as clients request activation.

    Btw. ensure that Windows Firewall allows inbound connections on TCP port 1688 (KMS default port).


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.