Reference

Complete ospp.vbs Commands Reference for Office Activation (2026)

Last updated · Reviewed by KMSAuto.software editorial team

ospp.vbs is the Office Software Protection Platform script — Office's equivalent of slmgr. It lives in the Office install folder and manages Volume License keys, KMS hosts, and activation status for Office 2016 through 2024.

Finding ospp.vbs

  • 64-bit Office: C:\Program Files\Microsoft Office\Office16
  • 32-bit Office on 64-bit Windows: C:\Program Files (x86)\Microsoft Office\Office16
  • Always invoke with cscript (NOT wscript) to see output: cscript ospp.vbs

Most-used ospp commands

  • cscript ospp.vbs /inpkey:<key> — install a product key.
  • cscript ospp.vbs /sethst:<KMS host> — set KMS host.
  • cscript ospp.vbs /setprt:<port> — set KMS port (default 1688).
  • cscript ospp.vbs /act — activate installed Office products.
  • cscript ospp.vbs /dstatus — show license status.
  • cscript ospp.vbs /dstatusall — verbose status for all SKUs.
  • cscript ospp.vbs /unpkey:<last 5 chars> — uninstall a key.

Resetting Office licensing

  • cscript ospp.vbs /rearm — reset activation grace period.
  • cscript ospp.vbs /cpky — clear stored key from registry.
  • cscript ospp.vbs /remhst — remove KMS host name.

Common workflows

  • KMS activation: /inpkey then /sethst then /act.
  • Check expiration: /dstatus shows REMAINING GRACE: ... in minutes.
  • Switch from MAK to KMS: /unpkey <last5> then /inpkey <GVLK> then /sethst then /act.

Frequently asked questions

Why does ospp.vbs say 'cannot find OSPP.VBS'?

The Office Click-to-Run installer no longer ships ospp.vbs by default for some channels. Reinstall Office using the Volume Channel via the Office Deployment Tool, or use KMSAuto.software's Ohook button which doesn't depend on ospp.

What's the difference between ospp /act and slmgr /ato?

ospp activates Office products only. slmgr activates Windows only. They are separate licensing systems despite sharing similar command structures.

How do I find the last 5 characters of my key?

Run cscript ospp.vbs /dstatus — the output includes 'Last 5 characters of installed product key' for each SKU.

Can ospp activate Office 365?

No. Office 365 (Microsoft 365) uses cloud licensing tied to your account, not KMS. ospp only works with perpetual/Volume builds.

Does ospp work on Office 2024?

Yes — the same command syntax applies. Office 2024 still ships ospp.vbs in the Office16 folder.

How long is an Office KMS activation valid?

180 days. A scheduled task auto-renews every 7 days while the KMS host is reachable.

Can I use ospp on Mac?

No. ospp.vbs is a Windows-only VBScript. macOS Office uses an entirely different licensing system.

Get KMSAuto.software Now

Free, safe and open source — supports every Windows & Office release through 2026.

Download Complete ospp.vbs Commands Reference for Office Activation (2026)

Archive

Comments

0/2000 — no signup needed

Loading comments…

✓ Free · Virus-free · 77 MB · ★ 4.9 (12k+)