Key Management Service (KMS) can be used to activate volume-licensed Office versions on your internal host without connecting to Microsoft’s Internet activation services. In this post, we’ll look at how to deploy KMS host with the Office Volume License Pack and use it to activate Microsoft Office on client computers.
This guide only 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 to Activate Microsoft Office
How to Install the Microsoft Office Volume License Pack on the KMS Host
You need to configure your KMS host to activate KMS Volume Licensed Office versions. The KMS host is a computer running Windows Server (2022/2019/2016) with the Volume Activation Services role installed.
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
Hint. The same KMS host can activate both Windows and Office products.
To activate the Volume License role, you will need to obtain your MS Office 2021/2019/2016 KMS Host Key (CSVLK). Previously, KMS host keys could be copied from the Microsoft Volume Licensing Service Centre (VLSC) website. This section has been moved to the Microsoft 365 Admin Center (Billing > Your Products > Products and Services). Select the Office version you need and copy the CSVLK key.
Then, depending on the CSVLK key you have, download and install the appropriate version of the Microsoft Office Volume License Pack on your KMS host:
- Microsoft Office LTSC 2021 Volume License Pack
- Microsoft Office 2019 Volume License Pack
- Microsoft Office 2016 Volume License Pack
Run the downloaded file (for example, Office2021VolumeLicensePack_x64.exe) as an administrator.
During the installation, the Volume Activation Tool windows will appear. Choose your preferred MS Office activation type:
- Direct activation with KMS host — can activate both domain and workgroup computers;
- The Active Directory-Based Activation (ADBA) — can activate only computers that joined the same Active Directory domain.
MS Office KMS Activation Method
If you are going to use the direct KMS activation
- Select the Key Management service, set your KMS server FQDN name, and install the KMS Host Key that you previously copied from the Microsoft Admin Center. You can also 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 host by phone. Activating a KMS host is a one-time operation;
- Once you have activated your Office KMS server, the window with your current KMS configuration will appear with the products with Licensed status:
Name:Office 16, VOLUME_KMS_channel, Name:Office 19, Office19KMSHost2019VL_KMS_Host, or Name:Office 21, VOLUME_KMSCLIEN_channel; - Close the Volume Activation Tools.
A new SRV _VLMCS._TCP_domainname record is created in the forward lookup DNS zone of your Active Directory domain. It allows clients to automatically discover your KMS host in the domain. You can find the KMS server in the current Active Directory domain using the nslookup command:
nslookup -type=srv _vlmcs._tcp
Enable the following Windows Firewall rule which allows clients activate against your KMS server:
Enable-NetFirewallRule -Name SPPSVC-In-TCP
You can use the Test-NetConnection cmdlet to test KMS server connectivity on port TCP/1688 from a client computer:
Test-NetConnection your-kms-server-name –Port 1688
Microsoft Office Active Directory-Based Activation (ADBA)
If you want to use Active Directory-Based Activation, you need to select this option in your Volume Activation Tools wizard.
Then specify the KMS host key (CSVLK) and enter the display name for a new activation object (optional).
It remains to activate the KMS host (online or by phone call).
Check the status of the MS Office KMS host by using the command:
- 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
Name: Office 19, Office19KMSHost2019VL_KMS_Host
Description: Office 19. Volume KMS channel
License Status: Licensed
This output shows that the 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.
How to Activate Volume Microsoft Office Using KMS Server
Volume-licensed versions of Office 2021, Office 2019, and Office 2016 are pre-installed by default with the Generic Volume License Key (GVLK). In this case MS Office on a domain-joined computer will automatically discover the KMS host by using a special VLSC record in DNS and perform KMS activation. In this case there is no need for manual entry of the GVLK key on the clients.
Once Office has been successfully activated on a client computer, it will remain in the licensed state for 180 days. Every 7 days, the client attempts to connect to the KMS host and renew the activation for a further 180 days. If the client computer fails to connect to the KMS server within 180 days, your copy of Office will switch to 30-day evaluation mode.
If Office is installed on a computer with a Retail or MAK key, you can manually set the GVLK key to switch it to a Volume License branch.
Copy the GVLK key for your version of Office 2021, 2019, 2016 (or Office Professional Plus/Standard, Project Professional/Standard, Visio Pro/Standard, Access, Excel, Outlook, Word, Skype for Business) from the following link.
Then run the following command to from MAK to KMS channel:
cscript ospp.vbs /inpkey:xxxxx-xxxxx-xxxxx-xxxxx-xxxxx
Restart your computer and the Office instance should automatically activate against the KMS host.
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. The built-in ospp.vbs script can be used to manage Office activation on the client’s computer.
Run these commands in Command Prompt as administrator:
- For Office 2016, 2019, 2022:
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”
- Manually specify the KMS server name:
cscript ospp.vbs /sethst:kms01.yourdomain.com
(optionally) You can set the KMS server port number:
cscript ospp.vbs /setprt:1688
- Activate your Office copy on the KMS server:
cscript ospp.vbs /act
- Check the Office activation status:
cscript ospp.vbs /dstatusall
Or you can launch your MS Office suite product and check the activation status through the File > Account menu.