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 contains | Meaning |
|---|---|
RETAIL channel | Consumer/retail licensing; volume mechanisms do not apply |
VOLUME_KMSCLIENT | Configured for KMS-style activation |
VOLUME_MAK | Multiple Activation Key licensing |
Subscription | Microsoft 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.
Related reading
- MAS activation methods compared
- MAS version history (upstream releases)
- Activation troubleshooting
- Security and source verification
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.