KMS (Key Management Service) allows you to legally activate your volume-licensed Microsoft products (Windows and Office) on your internal host without connecting to Microsoft’s Internet activation services. In this post, we’ll look at how you can deploy your own KMS host and use it to activate Microsoft Office installations on client computers.
This guide applies to the volume editions of Office 2021 LTSC, 2019, and 2016 (including Project and Visio) and doesn’t cover activation of subscription-based versions of Office (Microsoft 365 Apps for enterprise, ex-Office 365 ProPlus).
Table of Contents
Configure a KMS Host Server to Activate VMS Office 2021, 2019, and 2016
Microsoft Office KMS Server Requirements
To activate the Volume License Office, Project, or Visio version you must have a configured KMS host. For the different versions of Microsoft Office, there are requirements for the versions of Windows on which you can deploy the Office KMS Activation host:
- MS Office 2021 — at least Windows 10 or Windows Server 2016;
- MS Office 2019 — at least Windows 8.1 or Windows Server 2012 R2
- Microsoft Office 2016 — additionally supports Windows 7 SP1 (with the KB2757817 installed), and Windows Server 2008 R2 (with the KB2757817).
You must consider the date that Microsoft plans to end support for a particular volume version of Office when deploying a KMS activation host:
- Office 2016 and Office 2019 — Oct 14, 2025;
- Office 2021 LTSC — Oct 13, 2026.
To deploy a KMS host, first install the Volume Activation Services role on Windows Server.
Hint. Both Windows and Office products can be activated using the same KMS host.
You can install the Volume Activation Service using the Server Manager (Add roles and Features > Server Role > Volume Activation Services > Next > Next > Finish) or by using the following PowerShell command:
Install-WindowsFeature -Name VolumeActivation -IncludeAllSubFeature
To make sure the VolumeActivation role is installed, run the following command and check the Install State:
get-WindowsFeature -Name VolumeActivation
Then find and copy your MS Office 2021/2019/2016 KMS host key in the personal zone on Microsoft Volume Licensing Service Center (VLSC) website.
Install the Office Volume License Pack on the KMS Server
The Microsoft Office Volume License Pack is an executable file that installs all the necessary license files on the KMS server to activate a specific Office version, including Visio and Project, and recognizes the KMS host key.
To activate Microsoft Office, you need to download and install an appropriate Office Volume License Pack, and KMS host key for each MS Office version you want to use (unlike Windows KMS client activation, where the latest KMS Host key can activate older versions of Windows).
You can install and activate multiple Office Volume License Packs on your host to activate different versions of MS Office.
Download the latest Office Volume License Pack from the Microsoft Download Center using the following links:
- Microsoft Office LTSC 2021 Volume License Pack
- Microsoft Office 2019 Volume License Pack
- Microsoft Office 2016 Volume License Pack
For Windows Server 2022/2019/2016/2012R2, download the x64 version of the Volume License Pack.
Run the file that you downloaded (for example, Office2021VolumeLicensePack_x64.exe) as an administrator.
During the installation, the Volume Activation Tool windows will appear. You can choose one of the following activation methods:
- Direct activation with KMS host;
- The Active Directory-Based Activation (ADBA) — requires an Active Directory domain with Windows 2012 schema version (you need to check if you need to update Active Directory schema)
MS Office KMS Activation Method
- If you are going to use the direct KMS activation, choose the Key Management service, set your KMS server FQDN name, and install the KMS Host Key obtained earlier. You can install the KMS host key later by using the following command:
slmgr -ipk <Office-2019-KMS-Host-Key>)
- Select the KMS host activation method, either by phone or online. Provide a direct Internet connection on your server during the initial phase. Or you should activate your KMS server by phone. To run the Windows phone activation wizard run the command:
slui.exe 4
Activating a KMS host only needs to be done once. After that, the KMS server does not need to be connected to the Internet to activate clients.
- Once you have activated your Office KMS server, the window with your current KMS configuration will appear;
- The list of products with Licensed status should appear:
Name:Office 16, VOLUME_KMS_channel. Name:Office 19, Office19KMSHost2019VL_KMS_Host, or Name:Office 21, VOLUME_KMSCLIEN_channel;
- Close the Volume Activation Tools. The Software Protection Service will then restart with a new configuration.
During the KMS host activation, a new SRV _VLMCS._TCP_domainname record is created in the forward lookup DNS zone in the Active Directory. It allows clients to automatically discover your KMS server in the domain. You can find the KMS server in the current Active Directory domain using the nslookup command:
nslookup -type=srv _vlmcs._tcp
By default, the Software Protection Service, which performs the activation of the KMS, listens on TCP port 1688. You can enable an inbound Microsoft Defender Firewall rule that allows clients to access the KMS server using the PowerShell:
Enable-NetFirewallRule -Name SPPSVC-In-TCP
You can use the Test-NetConnection cmdlet to test KMS server connectivity from a client device that has MS Office installed:
Test-NetConnection your-kms-server-name –Port 1688
Microsoft Office Active Directory-Based Activation
If you want to use Active Directory-Based Activation, you need to select this option in your Volume Activation Tools wizzard.
Then you need to specify the KMS host key (CSVLK) and enter the display name for a new activation object (optional).
Your remaining task is to activate the KMS host (online or by phone call).
After that, close the VAT windows, and press Enter.
You can view information about the Office KMS host key that is installed on your server. Run the following command and specify the installation ID for your version of Office.
For Office 2016:
slmgr.vbs /dlv 98ebfe73-2084-4c97-932c-c0cd1643bea7
For Office 2019:
slmgr.vbs /dlv 70512334-47B4-44DB-A233-BE5EA33B914C
For Office 2021 LTSC:
slmgr.vbs /dlv 7F3B983-7C53-4D45-ABC6-BCD91E2DD90A
To check if your KMS host is ready to activate MS Office clients on your network, run the command:
slmgr.vbs /dli all
You can see some useful information about your KMS host here:
Name: Office 19, Office19KMSHost2019VL_KMS_Host
Description: Office 19. Volume KMS channel
License Status: Licensed
This output shows that Office 2019 Volume License Pack is installed and activated on the host.
- Current count — the number of clients activated on this KMS host;
- Listening port — the default 1688 TCP port is used;
- DNS publishing — automatic publication of the srv _vlmcs._tcp record in DNS is enabled;
- Total requests received — how many clients have tried to connect to this KMS host in the last 30 days.
Microsoft Office Generic Volume License Keys for KMS and ADBA Activation
By default, volume licensed versions of Office 2021, 2019, and Office 2016 are preinstalled with the Generic Volume License Keys (GVLK). GVLKs allow the installed Office copy to automatically discover and activate Office on the KMS host by using a special VLSC record in DNS.
How KMS work?
With a volume license, Office products will automatically search for a local KMS server during the installation process by using the DNS record. Once a KMS server has been found, the software activates itself for 180 days. The reactivation period is 7 days after which the activation period is being reset back to 180 days. If your computer fails to connect to the KMS server within 180 days, your copy of Office will switch to 30-day evaluation mode.
This means that once you have installed the KMS host, the copy of MS Office installed on the computer is automatically activated (if the Office instance on a computer has a GVLK installed and the computer is joined to the Active Directory domain). In this case, it is not necessary to enter the GVLK key manually on the clients.
Important. You can install Office 2019 or 2021 LTSC only on Windows 10/11 and Windows Server 2016/2019/2022.
Optionally, you can change the Office product key to KMS from the command prompt (you can use such a command when switching from MAK to KMS channel and vice-versa):
cscript ospp.vbs /inpkey:xxxxx-xxxxx-xxxxx-xxxxx-xxxxx
You can get an up-to-date GVLK list for KMS activation of Office 2021, 2019, and 2016 (including Office Professional Plus/Standard, Project Professional/Standard, Visio Pro/Standard, Access, Excel, Outlook, Word, Skype for Business) by following link.
Please note that these license keys can’t be used to activate personal/home editions of MS Office.
How to Manually Activate Microsoft Office on KMS Server
You can manually activate your copy of Office against a KMS server if your copy of Office is not automatically activated after you install the GVLK key. Use the built-in ospp.vbs script to manually activate the Office volume copy on the client’s computer.
Run these commands in Command Prompt as administrator:
- For Office 2016:
CD “C:\Program Files\Microsoft Office\Office16”
If you are using the 32-bit MS Office version installed on 64-bit Windows, you need to use this command:
CD “C:\Program Files (x86)\Microsoft Office\Office16”
- For Office 2019:
CD “c:\Program Files\Microsoft Office\Office19”
Or accordingly:
CD “C:\Program Files (x86)\Microsoft Office\Office19”
- For Office 2021 LTSC:
CD “c:\Program Files\Microsoft Office\Office21”
- Specify the KMS server name. In this case, the KMS server address will be stored in the registry REG_SZ parameter KeyManagementServiceName under the reg key HKEY_LOCAL_MACHINE\Software\Microsoft\Office\SoftwareProtectionPlatform:
cscript ospp.vbs /sethst:kms01.yourdomain.com
- You can change the KMS server target connection port number on the client using the command (REG_SZ parameter in the registry key HKEY_LOCAL_MACHINE\Software\Microsoft\Office\SoftwareProtectionPlatform\KeyManagementServicePort):
cscript ospp.vbs /setprt:1688
- Activate your Office copy on the KMS server:
cscript ospp.vbs /act
- You can get the current status of activation using this command:
cscript ospp.vbs /dstatusall
Or you can launch your MS Office suite product and check the activation status through the File > Account menu.
For Office 2016:
License NAME: Office 16, Office16ProPlusVL_KMS_Client edition
License DESCRIPTION: Office 16, VOLUME_KMSCLIENT channel
Product activation successfully
For Office 2019:
License NAME: Office 19, Office19KMSHost2019VL_KMS_Host edition
License DESCRIPTION: Office 19, VOLUME_KMS channel
Product activation successfully
For Office 2021 LTSC:
License NAME: Office 21, Office21KMSHost21VL_KMS_Host edition
License DESCRIPTION: Office 21, VOLUME_KMS_CLIENT channel
To activate your devices with the Office 2019/2016 installed on the KMS server, there must be at least 5 clients’ requests within the last 30 days (activation threshold). If there are not enough activation requests from clients on the KMS server (you did not reach a minimum number of copies to get the licensing working), an error will appear:
ERROR CODE: 0xC004F038
ERROR DESCRIPTION: The Software Licensing Service reported that the product could not be activated. The count reported by your Key Management Service (KMS) is insufficient. Please contact your system administrator.
You can display the activation history on the client:
cscript ospp.vbs /dhistorykms
To manage Office activation on remote computers, you can use the following command:
cscript ospp.vbs /act remotepc2