Managing Microsoft Office Activation via Command Prompt (CMD)

Created by Skyline Admin PH Team, Modified on Wed, 25 Mar at 9:36 PM by Skyline Admin PH Team

If you see a constant activation prompt when starting Office, or if the standard activation window isn't working, you may need to manually manage your product keys. This guide helps you identify, remove, or update your Office license using the console.


Before You Begin

This process applies to Office versions 2003 through 2021. You must run these commands as an Administrator.


Step 1: Open CMD as Administrator

  • Click the Start menu and type CMD.
  • Right-click Command Prompt and select Run as administrator.


Step 2: Navigate to the Office Directory

You need to point the console to your Office installation folder. Copy and paste the path that matches your installation:


  • For 64-bit Office:
    • cd "C:\Program Files\Microsoft Office\Office16"
  • For 32-bit Office:
    • cd "C:\Program Files (x86)\Microsoft Office\Office16"


    Note: The folder name "Office16" may change depending on your version (e.g., Office15 for Office 2013).


Step 3: Check Installed Keys

Run this command to see which licenses are currently active on your system:

cscript OSPP.VBS /dstatus


What to look for in the results:


  • How many keys are installed.
  • Which version of Office the key belongs to.
  • The Last 5 characters of the installed product key (you will need these for the next step).


Step 4: Remove an Invalid or Old Key

If you see multiple keys or an invalid one, remove it using the last 5 digits identified in Step 3:

cscript OSPP.VBS /unpkey:XXXXX

(Replace XXXXX with your specific 5 digits).


Step 5: Enter a New Product Key

To add your new license key, use the following command:

cscript OSPP.VBS /inpkey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

(Replace the Xs with your full 25-digit product key).


Step 6: Activate Office

Once the new key is stored, trigger the activation manually:

cscript OSPP.VBS /act


Troubleshooting Tip: If you cannot find OSPP.VBS in the folders above, it may be located in C:\Windows\System32. In that case, you must include the full path in your command, for example:

cscript "C:\Program Files\Microsoft Office\Office16\OSPP.VBS" /dstatus

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article