Educational ICT Virtualisation Specialist

Twitter LinkedIn E-mail
Precedence Technologies Ltd
Technology House, 36a Union Lane
Cambridge, CB4 1QB, United Kingdom
T: +44 (0)1223 359900
E: sales@precedence.co.uk
AddRemoveKMSKey

Jump To: Support > KB > Microsoft > AddRemoveKMSKey

Adding and removing a KMS host key from a KMS server

Adding a KMS host key

Firstly, you will need to get the KMS keys from Microsoft for your agreement by following the procedure here as they are no longer automatically provided when you set up a new volume licensing agreement.

Windows Server and Windows Desktop

A KMS host key will activate all older or lower-level operating systems (a desktop operating system is counted as being lower-level than a server operating system). So, for example, Windows Server 2022 Datacenter will activate:

  • Windows Server 2022 Datacenter
  • Windows Server 2022 Standard
  • Windows Server 2019 Datacenter
  • Windows 11 Pro
  • Windows 10 Pro
It will NOT activate Windows Server 2025 Datacenter or Windows Server 2025 Standard. You should therefore use the latest and highest-level KMS key you have the rights to use. The following commands will add the KMS key and activate it ready for use by other clients:
cscript \windows\system32\slmgr.vbs /ipk ABCDE-12345-FGHJK-67890-LMNPQ
cscript \windows\system32\slmgr.vbs /ato
Microsoft Office

You will generally need the KMS keys for the correct version of Office you wish to activate (probably Office 2024 at this point in time). On your KMS server, install the Microsoft Office LTSC 2024 Volume License Pack. This will walk you through entering the code and activating it

Removing a KMS key

Above, we described the /ipk (Install Product Key) argument for the slmgr.vbs script. There is a corresponding /upk (Uninstall Product Key) argument, but this does NOT take a product key. If you try to run cscript \windows\system32\slmgr.vbs /upk ABCDE-12345-FGHJK-67890-LMNPQ it will say Error: product key not found

The value you need to give to /upk is the Activation ID. To get this run the following command:
cscript \windows\system32\slmgr.vbs /dlv all
You will see a section similar to:
Name: Office 19, Office19KMSHost2019VL_KMS_Host edition
Description: Office 19, VOLUME_KMS channel
Activation ID: 70512334-47b4-44db-a233-1234567890ab
Then run the script with the activation ID, e.g.:
cscript \windows\system32\slmgr.vbs /upk 70512334-47b4-44db-a233-1234567890ab

Finally, you can run the cscript \windows\system32\slmgr.vbs /dlv all command again and check that the Office section is no longer listed

© Copyright Precedence Technologies 1999-2026
Page last modified on September 24, 2026, at 10:29 AM by sborrill