Skip to main content

2 - Microsoft Office/Office365 Activation

Local or Remote KMS Activation

This page assumes you have already install Microsoft Office. I will be going over the activation of the Microsoft Office 365 products 2016, 2019, and 2021 by activating Office 2021 which have the same steps.

To activate with KMS on local domain, if activating a product that has not done so automatically, load Word or another Microsoft product then head to the Account and Change Product Key. Find the key for your specific product on this page. If unable to activate, follow the instructions as follows:

For me, I'm using a domain and have my DNS entries setup. Which means when I install Office using the deployment tool in addition with my configuration file, it will activate automatically. Moreover, this guide assumes that you have DNS setup correctly. You can verify this by typing in the following command:

nslookup -type=srv _vlmcs.tcp #This will show the results of my KMS server. If there is an error, your DNS is not setup properly. This is beyond the scope of this document.

I personally have a KMS server that is hosted locally and remotely on separate servers. One is for public activation while the other is for personal activation. This assumes that your legit reason if for lab testing. The server for public testing is kms1.jjmtech.uk. The server is not located in the UK, it is in the U.S. and was the cheapest domain I could afford at the time for testing services.

*Anything after # symbol, do not type. These are notations.
**This guide assumes you already have a KMS server setup; otherwise, use a remote one as shown in the (e.x.) brackets.

Office 2021 Activation

Assuming you have read and verified the steps above, we can move on to the next steps. Activating Office 2021 LTSC. LTSC is the Long Term Support Channel of Office for businesses that don't need the next most recent version of Office. It is activated using the Generic Volume License Keys provided by Microsoft.

To active Office 2021, please following the steps below running Command Prompt as Administrator by right clicking Command Prompt and selection Run as Administrator. Type the following commands:

CD "C:\Program Files\Microsoft Office\Office16" #Use this first. If it says directory doesn't exist then use next command. If it changed into this directory, skip next command.
CD "C:\Program Files (x86)\Microsoft Office\Office16" #Use this only if the above command didn't find a directory.
cscript ospp.vbs /sethst:kms1.jjmtech.uk #This command manually sets the KMS host.
cscript ospp.vbs /setprt:1688 #This command manually sets the port number. Not needed if the port number hasn't changed from the default 1688.
cscript ospp.vbs /act #This command activates the install product key to Office.
cscript ospp.vbs /dstatus

#This command show the license status for all installed licenses.

If the activation fails, KMS works, and DNS is correct, enter the following command and enter the last 2 commands to reactive and check the status:

cscript ospp.vbs /inpkey:{product key} By using this command paired with correct key, you will convert the retail copy of Office to LTSC. Re-run the /act and /dstatusall commands to activate and check activation status.

Office De-Activation

For those of us testing in a lab environment, it may be useful to deactivate, uninstall, reinstall, and reactivate Microsoft Office. For that, we use the following commands to deactivate and upon reinstallation, refer to the above sections for reactivation.

CD "C:\Program Files\Microsoft Office\Office16" #Use this first. If it says directory doesn't exist then use next command. If it changed into this directory, skip next command.
CD "C:\Program Files (x86)\Microsoft Office\Office16" #Use this only if the above command didn't find a directory.
cscript ospp.vbs /dstatus

#This command show the license status for all installed licenses.

cscript ospp.vbs /unpkey:{key} #This command removes the key from the system. Use this for all products intended to be reinstalled.
cscript ospp.vbs /rearm #This command finalizes key removal and activation.
cscript ospp.vbs /ckms-domain #This command clears the KMS from cache.