How to Check Your Microsoft Office Licence with ospp.vbs

Step-by-step use of ospp.vbs to read Office licence status, grace period and installed key, plus how to interpret the output for Office LTSC and Microsoft 365 installs.

The Office equivalent of slmgr

Windows licensing is inspected with slmgr. Office licensing is inspected with ospp.vbs, a script Microsoft ships inside the Office program folder. If you are troubleshooting Office activation — including Office LTSC and the perpetual 2019/2021/2024 releases — this is where the truth lives.

Finding the script

The script sits in the Office installation directory. Typical locations:

C:\Program Files\Microsoft Office\Office16
C:\Program Files (x86)\Microsoft Office\Office16

Click-to-Run installations keep it under Program Files\Microsoft Office\root\Office16.

Open an elevated Command Prompt, change into that folder, then run the commands with cscript so the output appears in the console instead of a pop-up box.

The commands

cscript ospp.vbs /dstatus

The main report. For each installed product it prints:

  • the licence name and description (this is where you see whether the SKU is Volume or Retail),
  • the last five characters of the installed product key,
  • the licence status,
  • the remaining grace period in days.

cscript ospp.vbs /dstatusall

Lists every licence present on the machine, including ones that are installed but not in use. Useful when an old Office version left licences behind.

cscript ospp.vbs /inpkey:XXXXX-…

Installs a product key. Used with the public GVLK keys Microsoft publishes for volume deployments.

cscript ospp.vbs /unpkey:XXXXX

Removes a key by its last five characters — the same five characters /dstatus printed. This is how you clean up a conflicting licence.

cscript ospp.vbs /act

Triggers an activation attempt.

Reading the result

The two lines that decide everything are the licence description and the licence status.

Description containsMeaning
RETAIL channelConsumer/retail licensing; volume mechanisms do not apply
VOLUME_KMSCLIENTConfigured for KMS-style activation
VOLUME_MAKMultiple Activation Key licensing
SubscriptionMicrosoft 365, licensed through the signed-in account

If the status reads ---LICENSED--- with a long grace period, Office is activated. If it reads ---NOTIFICATIONS---, it is not, and the error code printed alongside is the thing to look up.

Why this matters for Ohook

Ohook, the Office method documented by the upstream MAS project, works at the licensing layer rather than by installing a KMS client key. That means /dstatus is the reliable way to confirm state after using it, and it is also how you confirm that an old KMS client key is not still fighting for the same product.

A note on Microsoft 365

Subscription installs authenticate against the signed-in account. ospp.vbs will report them, but the fix for a broken subscription install is account and licence assignment, not licensing commands.

Before reporting an Office problem

Include the /dstatus output with the key characters intact, the exact Office build from File → Account, and the error code. That turns an unanswerable question into a solvable one.


massgrave.download is an independent documentation and troubleshooting resource. It is not the official Massgrave project. The official project lives at massgrave.dev and github.com/massgravel.

Get MAS from the official project

This site does not host its own build of the scripts. The buttons below go to the project’s own repository and mirrors, so what you get is what the developers published.

PowerShell one-liner published by the project:

irm get.activated.win | iex

Check the domain before running it, and see how to verify what you run.

Activation tooling is routinely classified as riskware by antivirus software. That is expected for this category and is not by itself evidence of malware — nor proof that a particular copy is clean. Verify the source before running anything.