How To Activate Microsoft Office Using Cmd
To activate a compatible Microsoft Office installation using CMD, open Command Prompt as administrator, locate ospp.vbs, install your valid product key with cscript ospp.vbs /inpkey:YOUR-KEY, then run cscript ospp.vbs /act. Check the result with cscript ospp.vbs /dstatus. This method is intended for volume-licensed Office; Microsoft.
Which licences fit your PC setup?
Prices are an AUD snapshot, not a live quote. Confirm variant and total on the listing.
-

Office 2021 Pro Plus key
$57.00 AUD
-

Office 2019 Pro Plus key
$45.00 AUD
-

Microsoft 365 Pro Plus, 5 devices
$15.00 AUD
$29.00
Check whether CMD activation suits your Office licence
Before entering commands, open Word or Excel and select File > Account. Check the product name and activation information. A product key must match the installed Office edition and licensing channel; entering a different key does not automatically make an incompatible installation suitable.
| Office licence | Activation route |
|---|---|
| Volume-licensed Office using a Multiple Activation Key (MAK) | Use the authorised key with ospp.vbs, then request activation. |
| Office managed through an organisation's Key Management Service (KMS) | Connect to the organisation's network or required VPN and follow its IT instructions. |
| Microsoft 365 subscription or an account-linked retail purchase | Open an Office app and sign in with the account associated with the licence. |
Microsoft's Office volume activation documentation explains that ospp.vbs manages volume-licensed products and does not work for Microsoft 365 Apps. The steps below apply to a Windows installation using that script.
If Office prompts you to sign in, use the Microsoft account, or work or school account, associated with your purchase or subscription. Follow Microsoft's activation guidance for that route.
Prepare your product key and connection
Have your purchase record or organisation-issued key available before changing anything. For MAK activation, connect to the internet. For KMS activation, make sure the computer can reach your organisation's activation service; an ordinary internet connection alone may not provide that access.
If you are checking an existing installation, our guide to finding an Office product key using Command Prompt can help you identify available key information. Do not assume that a status command will reveal the full key: ospp.vbs normally displays only its last five characters.
Our guide to finding an Office product key in the registry covers another place people check. Key recovery depends on the installation, so keep the original purchase details rather than relying on registry information.
For account-linked purchases, a full key may not be available to view. Microsoft's advice on using Office product keys explains when signing in replaces entering a key.
Activate Office using Command Prompt
Run each command separately and read its output before continuing. The example key below is a placeholder.
-
Open Start, type cmd, right-click Command Prompt and select Run as administrator. Accept the Windows prompt if you have administrator access.
-
Locate the folder containing ospp.vbs. One common location is C:\Program Files\Microsoft Office\root\Office16. To select it, enter:
cd /d "C:\Program Files\Microsoft Office\root\Office16"
If that folder does not exist, check C:\Program Files\Microsoft Office\Office16. For 32-bit Office on 64-bit Windows, check the equivalent folders under C:\Program Files (x86). Use the actual folder containing the script; do not guess a folder number from the product's release year.
-
Confirm that the script is present:
dir ospp.vbs
Then inspect the existing licence information:
cscript ospp.vbs /dstatus
If the relevant product already shows LICENSED, there is no need to replace its key.
-
If you need to install an authorised MAK key, run the following command, replacing all five groups of Xs with your own key:
cscript ospp.vbs /inpkey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
This installs the key and can replace an existing one. It does not complete activation by itself. For an organisation-managed KMS installation, follow IT's instructions rather than substituting another key.
-
Request activation:
cscript ospp.vbs /act
Wait for the result. If activation fails, record the error code and message before closing the window.
-
Check the status again:
cscript ospp.vbs /dstatus
Look for LICENSED against the intended Office product. A grace-period status is not confirmation of completed activation. Reopen Word or Excel and check File > Account as well.
Resolve activation errors without repeating the same commands
The folder or script cannot be found
Check the installation path, including whether it uses Program Files (x86) or includes the root folder. Keep quotation marks around paths containing spaces. If ospp.vbs is absent, confirm your Office licence type before looking for another activation method.
The product key is rejected
Check for typing errors, then compare the key's edition and licensing channel with the installed product. If the message reports that the key is blocked or its activation allowance has been exceeded, contact your organisation's licence administrator or Microsoft Support with your purchase details. Repeatedly entering the key will not resolve a licensing restriction.
Office cannot reach an activation service
Check the connection required by your licence: internet access for online MAK activation, or access to your organisation's KMS service. Running /act is not a general offline activation method. If the computer must remain offline, ask your administrator or Microsoft Support about the supported options for that licence.
Microsoft's volume activation troubleshooting guidance covers connection issues and error codes. It also recommends restarting Office applications when their activation information has not updated.
Confirm the result in Office
After activation, check the intended product rather than assuming every licence listed by the script has changed. For related installation and account help, browse our Microsoft Office guides.
Open Word now and check File > Account. If activation is still required, save the exact error message and product name for your support request.
Other editions for separate workloads
Other editions for separate workloads; prices in AUD, confirm the total on the listing.
-

Windows 11 Pro key
$14.99 AUD
$29.00 -

Office 2024 Pro Plus key
$20.00 AUD
$39.00 -

Windows 11 Home key
$18.88 AUD
$37.00
How to check this worked
- Open Settings, System, Activation and confirm the edition shown.
- Enter the key and run activation; expect a green tick within a minute.
- Reboot and re-check activation survives the restart.
FAQ
What else should you know before buying?
- What do I need before starting?
- Read the requirements and confirm the edition first; the steps assume the machine is compatible.
- How do I know the licence is genuine?
- Activate on Microsoft's servers and check Settings, System, Activation. A working activation is the test.
- Is this a subscription?
- Keys sold here are one-time lifetime licences. Microsoft 365 plans are billed by Microsoft instead.
- What if the key fails?
- Email hi@ms.codes with the order number and a screenshot. Replacement or refund applies within 30 days.
Check who prepared and reviewed this guide
- Written by
- MS.Codes editorial
- Reviewed by
- Support team
Last verified: (source review; see test status above).