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
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
cscript \windows\system32\slmgr.vbs /dlv allYou 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-1234567890abThen 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


