To activate Microsoft Office using the command prompt, you can use the following command in the CMD window.
cd "C:\Program Files\Microsoft Office\Office16" && cscript ospp.vbs /setVLMCLIPK <Your-Product-Key> && cscript ospp.vbs /act
Make sure to replace `<Your-Product-Key>` with your actual product key.
What is CMD?
The Command Prompt (CMD) is a powerful interface that allows users to execute commands directly to the operating system. Unlike the graphical user interface (GUI), CMD operates in a text-based environment, enabling more advanced troubleshooting and configurations for users—particularly for tasks that require administrative privileges, such as activating Microsoft Office.

Why Use CMD for Office Activation?
Using CMD to activate Office can have several advantages:
- Speed: Activating through CMD can be quicker than navigating through multiple GUI settings.
- Automation: For IT professionals managing multiple installations, CMD scripts can automate the activation process across different machines.
- Error Resolution: CMD often provides specific error codes that can assist in troubleshooting issues effectively.

Prerequisites for Activating Office via CMD
Check Your Office Version
Before proceeding, you need to ascertain the version of Microsoft Office installed on your machine (32-bit vs. 64-bit). You can find this information in the program properties or the control panel.
Administrative Rights
It is crucial to run CMD with administrative rights to ensure that you have the necessary permissions to execute the required commands. To open CMD as an administrator:
- Search for "cmd" in the Start menu.
- Right-click on "Command Prompt" and select Run as administrator.
- If prompted, grant the necessary permissions.

Step-by-Step Guide to Activate Office Using CMD
Initial Setup
First, you need to navigate to the Office installation directory using the Command Prompt. This is where the activation files are located.
cd "C:\Program Files\Microsoft Office\OfficeXX"
Replace `OfficeXX` with the specific folder that corresponds to your version of Office (e.g., `Office16` for Office 2016).
Activation Commands
Using the Software Licensing Tool (slmgr)
The `slmgr.vbs` script is a Windows tool specifically designed for software licensing management.
- To install a new product key, use the following command:
slmgr /ipk <your-product-key>
Replace `<your-product-key>` with the unique key you received when you purchased Office. This command installs the product key on your system.
Activate Office
Once the product key is installed, you can proceed to activate Office with the following command:
slmgr /ato
This command attempts to activate the software using Microsoft's activation servers, facilitating online activation.
Confirming Activation
After activation, it's essential to check that Office has been successfully activated. You can do this by using the command below:
slmgr /xpr
This command will display a message indicating whether your Office installation is permanently activated or if there's an expiration date associated with the license.

Troubleshooting Common Activation Issues
Error Messages
It's common to encounter error messages during activation. Here are some frequently seen errors and their remedies:
- Error 0xC004F074: This typically indicates a problem with the Key Management Service (KMS). Ensure that your system can reach the KMS host.
- Error 0x80070005: This error relates to permission issues, often resolved by running CMD as an administrator or checking system settings.
Firewall and Internet Connection
Activating Office requires a stable internet connection. If CMD presents activation errors, verify your internet connectivity by executing the following command:
ping www.microsoft.com
If you receive replies, your connection is intact, and you can focus on other potential issues.

Additional Commands Related to Office Activation
Re-arming Office
If you need to temporarily extend the trial period of Office without full activation, you can use the re-arm command:
cscript ospp.vbs /rearm
This command essentially resets the number of days of trial period that you have left, allowing additional usage without a key in specific scenarios.
License Management
To manage and monitor your Office licenses, use the following command to list the currently installed licenses:
cscript ospp.vbs /dstatus
This command provides a detailed status of your Office licenses, including activation status, product IDs, and expiration information, giving you better insight into your Office installation.

Frequently Asked Questions (FAQ)
-
Can I activate Office without a product key?
No, activating Office requires a valid product key that can be obtained through purchase. -
What if CMD doesn't recognize my commands?
Ensure that you are in the correct directory where the Office installation files are located and that you are using the correct syntax. -
Is it safe to use CMD for activation?
Using CMD is generally safe when following official Microsoft instructions. Ensure that you are executing legitimate commands and not relying on unverified sources.

Conclusion
Activating Microsoft Office through CMD is an efficient method that empowers users to optimize their software experience. By following the outlined steps and understanding the associated commands, you can ensure a seamless activation process and troubleshoot common issues effectively. Remember to keep the activation credentials secure and consult Microsoft resources for any further assistance required.

Additional Resources
For more detailed guidance and documentation on CMD commands and Microsoft Office activation, refer to the official Microsoft support page and reputable CMD training platforms for further learning opportunities.