To activate Office 365 using CMD, you can run the following command in an elevated Command Prompt window to initiate the activation process.
cscript "C:\Program Files\Microsoft Office\Office16\OSPP.VBS" /sethst:kms.your_kms_server.com
cscript "C:\Program Files\Microsoft Office\Office16\OSPP.VBS" /act
Understanding Office 365 Activation
What is Office 365 Activation?
Office 365 activation is the process through which users convert their purchased subscription or license into an active product. This is essential because activation allows users to access the full range of features provided by Office 365. Without activation, users may face limitations on functionality, regular reminders to activate, or even loss of access to the software entirely.
Why Use CMD for Activation?
Using Command Prompt (CMD) to activate Office 365 can be particularly advantageous in several scenarios:
- Quick Troubleshooting: If the graphical user interface fails to activate Office, CMD offers an alternative method that can bypass common issues.
- Bulk Management: For IT administrators managing multiple installations, CMD scripts can be executed to streamline the activation process across many devices.
- Remote Operations: When working with systems without a GUI or in headless environments, CMD is indispensable.

Prerequisites for Using CMD to Activate Office 365
System Requirements
Before proceeding with activation using CMD, ensure you meet the following system requirements:
- An appropriate version of Windows (Windows 10 or later is recommended).
- Compatible Office 365 installations (check the version information).
Installation of Office Software
It's crucial to have Office 365 correctly installed on your computer. If you haven’t installed it yet, you can use the Office Deployment Tool (ODT) to do so. Ensure that the installation is completed successfully before attempting activation.
Administrative Rights
Activating Office 365 via CMD requires administrative access. To run CMD with admin rights:
- In the Windows Search bar, type `cmd`.
- Right-click on Command Prompt and select Run as administrator.
Doing this ensures you have the necessary permissions to execute the activation commands.

Configuration Steps for Activating Office 365 via CMD
Locate the Office Installation Folder
Activating Office 365 through CMD requires you to know the installation directory of Office. Generally, the file paths differ based on whether you installed a 32-bit or 64-bit version:
- For 32-bit Office on 64-bit Windows:
C:\Program Files (x86)\Microsoft Office\Office16
- For 64-bit Office on 64-bit Windows:
C:\Program Files\Microsoft Office\Office16
Make sure to navigate to the correct directory corresponding to your installation.
Open Command Prompt in the Office Directory
To execute the activation commands, you must navigate to the Office installation folder directly from the CMD. Here's how to do it:
cd "C:\Program Files\Microsoft Office\Office16"
Explanation of the Command:
- `cd` stands for "change directory."
- The quotes are necessary if your path contains spaces, ensuring CMD reads it correctly.

Executing Activation Commands
Using the Software Licensing Service Script (slmgr)
The Software Licensing Management Tool (`slmgr`) is a script tool included in Windows. It can help manage licenses for Microsoft products. A basic command to view the license status of Office is:
slmgr.vbs /xpr
This command provides you with information about whether your Office installation is permanently licensed or not.
Activate Using Office Command Line
In order to activate Office 365, you'll primarily utilize the `ospp.vbs` script, specifically designed for Office activations. To activate Office 365, use the following command:
cscript ospp.vbs /activate
Breakdown of the Command:
- `cscript`: This runs the script in the command line instead of the Windows-based interface.
- `ospp.vbs`: Refers to the Office Software Protection Platform script, where the major operations related to Office licensing are handled.
- `/activate`: This parameter instructs the script to initiate the activation process.

Troubleshooting Common Issues
Error Messages during Activation
When you attempt to activate Office 365 via CMD, you may encounter various error messages. Here are some common scenarios and how to resolve them:
- Error 0xC004FC03: This indicates that the key you are trying to use is invalid or has been blocked. Make sure you are using the correct product key.
- Error 0xC004C008: This error suggests that the maximum number of activation attempts has been reached. You might have to contact Microsoft support to reset your activation number.
Verifying Successful Activation
After running the activation command, it’s vital to check if the activation was successful. You can verify the status with:
cscript ospp.vbs /dstatus
Explanation of Output:
The command will provide a series of outputs that detail the status of the Office license, including whether it is activated and its expiration date if applicable.

Additional CMD Commands for Office 365 Management
Deactivating Office 365
If you need to deactivate Office for any reason, you can use the following command:
cscript ospp.vbs /deactivate
This command is essential when switching between devices, as it ensures that the license can be used on another machine.
Reactivating Office 365
In cases where you need to reactivate Office 365—perhaps after reinstalling or changing hardware—you can use the same activation command mentioned before:
cscript ospp.vbs /activate

Conclusion
By utilizing CMD for activating Office 365, you can expedite the process and gain access to all features of the software. Whether you're troubleshooting an activation failure or managing multiple installations in a corporate environment, CMD provides a powerful alternative to traditional activation methods.
Explore more CMD functionalities to streamline your Office 365 management and enhance your productivity!

Frequently Asked Questions (FAQs)
What should I do if I encounter errors during activation?
If you encounter errors, make sure to double-check your product key, verify your installation, and confirm you have the necessary administrative rights. Consult the official support documentation for specific error codes for more tailored solutions.
Can I activate Office 365 without an internet connection?
Activation typically requires an internet connection. However, if you have a volume license key, you might have options for offline activation.
How to change the product key using CMD?
To change the product key, use the following command before activation:
cscript ospp.vbs /inpkr <Your-New-Product-Key>
This command updates the product key, and you can then proceed to activate it as usual.

References
Always refer to the official Microsoft documentation for the most current guidelines and instructions on Office 365 activation and management commands.