If you have a conflicting or expired key blocking your activation, wipe the old key out by targeting its last 5 characters (found using the /dstatus command above): cscript ospp.vbs /unpkey:YYYYY Use code with caution.
Managing Microsoft Office licenses in corporate networks or on individual machines often requires more precision than the standard graphical user interface offers. When IT administrators need to check activation statuses, install new product keys, or remove old licenses, they turn to a built-in Microsoft command-line script called ospp.vbs .
The file path for ospp.vbs depends entirely on your version of Microsoft Office (Office 2013, 2016, 2019, 2021, or Microsoft 365) and whether you are running a 32-bit or 64-bit version of the software. Here are the standard default installation paths: For Microsoft 365, Office 2021, 2019, and 2016:
Click the menu, type cmd , right-click Command Prompt , and select Run as administrator . download ospp.vbs
Note: The script does not work for Microsoft 365 Apps or subscription-based services. Microsoft uses a PowerShell script named vnextdiag.ps1 to handle subscription-based licensing diagnostics. Why You Should Never Download ospp.vbs Online
The ospp.vbs script is a legitimate and powerful tool for managing volume-licensed Microsoft Office installations, but it is not a magic fix for activation problems. The key takeaways are:
Replace the X's with your actual volume license key (MAK or GVLK). If you have a conflicting or expired key
In most cases, you separately. It is automatically installed as part of the Microsoft Office suite. If the file is missing, it usually indicates an incomplete installation or a non-volume license version of Office (like some Microsoft 365 subscriptions), rather than a need for a separate download. Official File Locations
You need to know if you have 32-bit or 64-bit Office.
Replace <your_KMS_host_name> with your server's address (e.g., kms.contoso.com ). You can also set the port if needed with the /setprt option. The file path for ospp
Yes. Use offline activation with /dinstid to generate an Installation ID. Then, on an internet‑connected computer, obtain a Confirmation ID from Microsoft (via phone or web). Finally, run cscript ospp.vbs /actcid:confirmation_id .
Because ospp.vbs is already on your system, you just need to know where to look. The file path depends on your version of Microsoft Office and whether you installed the 32-bit or 64-bit version of the suite. Here are the standard default installation directories:
Type "cmd" in the Start menu, right-click it, and select Run as Administrator .
If you are searching for a way to , the most important piece of information you need to know is this: You do not need to download this file from the internet because it is already built directly into Microsoft Office.
This guide is based on Microsoft's official documentation and best practices as of March 2026.