Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

There is no universal Command Prompt command that activates every Microsoft Office edition. For supported perpetual and volume-licensed versions, you can use ospp.vbs with a valid key or an organization’s authorized activation service; Microsoft 365 Apps and subscription versions of Project or Visio normally activate when you sign in with the licensed account.

This guide explains how to check the installed license, activate a legitimate retail or MAK key, and trigger an organization’s KMS or Active Directory-based activation. CMD commands do not create a license or bypass Microsoft activation requirements.

Before you start: determine which Office you have

The right activation method depends on the edition installed:

Office installation Typical activation method Use ospp.vbs?
Microsoft 365 Apps Sign in with the licensed Microsoft or work/school account No
Subscription Project or Visio Sign in with the account that owns the subscription No
Office LTSC 2024, LTSC 2021, Office 2019, or Office 2016 volume edition MAK, KMS, or Active Directory-based activation Yes
Some older perpetual installations Product key or organization-managed activation Often

Most consumer copies of Office 2024, Office 2021, and Office 2019 are associated with a Microsoft account. For those installations, signing in is usually more appropriate than entering a key through Command Prompt. Office 2016 and Office 2019 reached end of support on October 14, 2025; they may still activate with a valid license, but using a supported Office release is safer.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Womier Double Shot PBT Keycaps Set Custom Cherry Profile Key caps
  • 【Durable Doubleshot PBT Keycaps】Are you still struggling to find well-built keycaps? Our Womier custom keycaps is well built by strong PBT material and doubleshot process, extending their service life, resistant to oiling, scratching, and other forms of wear and tear
  • 【Classic Cherry Profile Keycaps】Why cherry keycaps? Not only because they can provide you with a more natural and more comfortable typing experience, but also cherry profile is timeless, tactile and tough. That's why it's still popular so far
  • 【Vintage Grey Style Keycaps】How to color coordinate your keyboard keycaps? If you're a Gorpcore enthusiast, this retro keycaps is a must-have. The color design can matches most mechanical gaming keyboard keycaps, making your keyboard cooler
  • 【Good Versatility】No matter what kind of keyboard 60 percent, 75 percent, or 100 percent you have? This keycap 60 75 100 percent can work with full-size keyboards, 61/64/68/84/87/100/104/108 keys are suitable. Please rest assured to choose the 132 keys keycaps set
  • 【24/7 Service】What's in box? A keycap puller is included, making it easier to customize the hot swappable keyboard to your liking. Please check if the products inside the packaging is intact as soon as you receive this items. If needed, please leave a message anytime

Open an elevated Command Prompt

  1. Open Start and type Command Prompt.
  2. Right-click Command Prompt.
  3. Select Run as administrator.
  4. Choose Yes if User Account Control asks for permission.

Administrator access may be needed to modify system-level Office licensing information.

Find the Office activation script

For current Click-to-Run volume editions, ospp.vbs is commonly in one of these folders:

64-bit Office: C:\Program Files\Microsoft Office\root\Office16\ospp.vbs

32-bit Office on 64-bit Windows: C:\Program Files (x86)\Microsoft Office\root\Office16\ospp.vbs

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Older installations may omit the root folder. In that case, check C:\Program Files\Microsoft Office\Office16\ospp.vbs or C:\Program Files (x86)\Microsoft Office\Office16\ospp.vbs. Office and Windows can have different bitness, so do not assume the correct folder from Windows architecture alone.

Check whether the first path exists:

dir “C:\Program Files\Microsoft Office\root\Office16\ospp.vbs”

If Windows cannot find the file, try:

dir “C:\Program Files (x86)\Microsoft Office\root\Office16\ospp.vbs”

Then test the paths without root.

Check the installed license

Use the full path that exists on your computer. For 64-bit Office on 64-bit Windows, run:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

cscript “C:\Program Files\Microsoft Office\root\Office16\ospp.vbs” /dstatus

For 32-bit Office on 64-bit Windows, run:

cscript “C:\Program Files (x86)\Microsoft Office\root\Office16\ospp.vbs” /dstatus

The output shows installed license information, including the license status and the last five characters of the installed product key. It does not reveal the complete key. To display information for all installed Office licenses, use the matching path with /dstatusall, for example:

Rank #2
Womier Pudding Keycaps, PBT Shine Through Keycaps Black 164 Keys Set
  • 【Ultra-Wide Compatibility with Standard and Non-Standard Keycap Kits】 The keyboard keycaps contain 141 Keys+24 keys, Fits most mechanical keyboard brands, for Steel series, Razer, Corsair, and almost all other MX stem mechanical keyboards. [Tip: If you're not sure if the keycaps fit you perfectly keyboard. You can message customer service at any time. We will answer for you! ]
  • 【Enduring Double Shot PBT Keycaps】These PBT keycaps are made with thick walls and are resistant to wear. Textured finish for a premium look and feel. The letters on the keycap are closed and have no gaps. Exquisite workmanship.
  • 【Environmental Keycap Storage Box+keycap Pulle】This pudding keycap set comes with an eco-friendly, beautiful, and practical paper keycap storage box that can keep your keycaps from being messy, so you can safely store each keycap. (Tip: The canned box and the eco-friendly carton are delivered randomly, and both boxes are very practical.)
  • 【Perfect for PC Gaming】 Translucent layer unleashes more brilliant backlight effects out, upgrade your basic RGB keyboard illumination to another more dazzling and fancy outlook level.
  • 【Ergonomic Arrangement Shine Through Keycaps】OEM profile, R1 to R4 row height, keycap surface tilt, tilt direction are different, curvature to fit the fingers, more comfortable typing.

cscript “C:\Program Files\Microsoft Office\root\Office16\ospp.vbs” /dstatusall

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Replace the path with the location that exists on your computer. Multiple licenses may appear if an old key was not removed or several Office products are installed.

Activate a valid retail or MAK key from CMD

Use this procedure only if the installed Office edition supports ospp.vbs and you own a valid key or have an authorized MAK key from your organization.

1. Install the key

Replace the placeholder with the 25-character key:

cscript “C:\Program Files\Microsoft Office\root\Office16\ospp.vbs” /inpkey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

For 32-bit Office, use the corresponding path under C:\Program Files (x86).

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

2. Trigger activation

Run:

cscript “C:\Program Files\Microsoft Office\root\Office16\ospp.vbs” /act

A MAK activation requires internet access. It may fail if the connection uses a proxy requiring authentication; telephone activation may be necessary. For 32-bit Office, use its matching script path.

3. Confirm the result

Run /dstatus again, close every Office application, and reopen Word or Excel. You can also verify activation in the app under File > Account. The Product Information section shows the product and activation state.

Replace an incorrect or expired key

First identify the installed key by running /dstatus with the correct script path. Note the last five characters shown in the output. Remove that key with:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

cscript “C:\Program Files\Microsoft Office\root\Office16\ospp.vbs” /unpkey:XXXXX

Replace XXXXX with the actual final five characters. Then install the replacement key using /inpkey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX and run /act. Use the path that matches your installation. Be careful on a shared or managed computer: removing the wrong key can affect another Office product.

Rank #3
Sale
dagaladoo PBT Keyboard keycaps,Matcha moa keycaps,Green Frog
  • 【Rainy lotus pond theme】 Inspired by the serene rainy days and the lush nature theme. The patterns on the keycaps include playful raindrops, cute frogs, tender flowers and plants, etc., telling the story of a peaceful rainy ecosystem. The dynamic gradient color scheme features a seamless gradient of keycaps from soft yellow to emerald green, adding a touch of fantasy to your keyboard.
  • 【Thick PBT keycaps & dye sublimation process】 Made of durable PBT material, these keycaps maintain their luster and prevent wear and tear, ensuring they remain bright and textured for a long time. The keycap pattern is made by a complex thermal sublimation technology to ensure that the pattern does not fade after long-term use and remains clear and bright.
  • 【Ergonomic MOA Profile design】These keycaps feature a comfortable MOA height design, optimizing ergonomic typing comfort and reducing finger fatigue caused by long gaming or typing hours.
  • 【Widely Compatible】Dagaladoo keycap set is compatible with major-sizes keyboards including but not limited to 60%, 65%, TKL, 75%, 96%, compact keyboard, and full-size keyboards
  • 【What You Get】1x132 keycap set and 1 keycap puller.Our products provide user-friendly after-sales service, if you receive the product is missing or damaged, please contact us by email.

Use CMD for an organization’s KMS activation

KMS is for organizations with an authorized Key Management Service host. It is not a way to activate a personal retail copy, and you should not use a public KMS server.

A correctly configured KMS client normally discovers the host through DNS service records. Check its status using /dstatusall with the correct script path, then trigger activation with:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

cscript “C:\Program Files\Microsoft Office\root\Office16\ospp.vbs” /act

If your administrator supplied a KMS host name and DNS discovery is unavailable, specify it manually:

cscript “C:\Program Files\Microsoft Office\root\Office16\ospp.vbs” /sethst:kms.example.com

Replace kms.example.com with your organization’s actual host, then run /act. The default KMS port is 1688. If the administrator uses another port, specify it like this:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

cscript “C:\Program Files\Microsoft Office\root\Office16\ospp.vbs” /setprt:1750

To remove a manually configured host and return to DNS-based discovery, run:

cscript “C:\Program Files\Microsoft Office\root\Office16\ospp.vbs” /remhst

This also resets the port to 1688. To inspect KMS activation history, use /dhistorykms. To display a description of an error code, use /ddescr:0xC004F042 with the script path.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Active Directory-based activation

Active Directory-based activation is another organization-managed method. It requires a volume-licensed Office edition, a supported Windows device joined to the organization’s Active Directory domain, and activation infrastructure configured through Volume Activation Services on Windows Server. The organization must create and publish the activation object first. Running the client command on an unrelated home computer will not activate Office.

Rank #4
Thyrnovyn 126 Keys PBT Double Shot Keycaps, Macaron Pastel Cute Keycap Set, Pink Blue Dreamy Cherry Profile Keycaps for Mechanical Keyboard 60% 65% 75% 100% Cherry MX Switches
  • 【DREAMY PASTEL MACARON THEME】 Sweeten up your desk setup with this gorgeous macaron-inspired keycap set. Blending soft pastel purple, baby pink, mint green, and creamy white, it creates a cozy, dreamy, and aesthetic vibe that is perfect for kawaii gaming setups and anyone who loves a bright, uplifting workspace.
  • 【DOUBLE-SHOT PBT CRAFT】 Don't compromise durability for beauty. Made from premium, thick PBT material, these keycaps offer a satisfying matte texture that resists sweat, oil, and shine. Featuring advanced double-shot injection technology, the crisp legends are molded directly into the plastic, guaranteeing they will never fade or wear off, keeping your pastel colors flawless forever.
  • 【CLASSIC CHERRY PROFILE】 Enjoy the ultimate typing and gaming experience with the gold-standard Cherry profile. Designed with an ergonomic, sculpted step layout, these keycaps perfectly hug the natural curve of your fingertips. This significantly reduces hand fatigue during long typing sessions and delivers a deep, satisfying "thocky" sound.
  • 【EXTENSIVE COMPATIBILITY】 This versatile 126-key set includes a comprehensive range of base keys and essential modifiers to fit various custom layouts. It is universally compatible with most standard ANSI layouts, perfectly fitting 60%, 65%, 75%, and 100% form factors (including 61/65/68/75/84/87/98/104 keys) mechanical keyboards equipped with Cherry MX style switches.
  • 【KEYCAPS ONLY-EASY INSTALLATION】 Package includes 126 PBT keycaps and a keycap puller . Keyboard is NOT included. Designed for quick installation and seamless replacement, making it easy to customize your keyboard in minutes.

With the infrastructure configured, trigger client activation using cscript “C:\Program Files\Microsoft Office\root\Office16\ospp.vbs” /act and the path matching your installation. A successful activation lasts for up to 180 days and renews periodically through Active Directory.

Microsoft 365 Apps: use sign-in instead

ospp.vbs does not activate Microsoft 365 Apps or subscription versions of Project and Visio. Use the supported account-based process:

  1. Open Word, Excel, or another installed Office app.
  2. When prompted, sign in with the Microsoft account or work/school account that owns the license.
  3. If you have an unused product key, visit Office.com/setup or Microsoft365.com/setup.
  4. Sign in and enter the key without hyphens if the page requests it.
  5. Return to the Office app and sign in with the same account.

If you already redeemed the key and see “This product key has already been used,” do not keep trying to enter it. Sign in to the Microsoft account that originally redeemed it and install Office from that account.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For newer perpetual versions, you may be able to change the license inside the app: File > Account > Product Information > Switch License. Choose Use a different account or Enter product key instead, depending on the available options. If Switch License is missing, update Office first.

Shared-computer activation is different

Organizations that deploy Microsoft 365 Apps on shared PCs configure shared-computer activation through the Office Deployment Tool, Group Policy, the registry, or Microsoft support tools—not through ospp.vbs.

The Office Deployment Tool setting is:

<Property Name=”SharedComputerLicensing” Value=”1″ />

The corresponding registry location and value are:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\Configuration

SharedComputerLicensing = 1

Each licensed user must sign in. Office obtains an activation token from the Office Licensing Service; the token is valid for 30 days and renews when the user signs in and uses Office.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Fix common activation errors

“Input Error: Can not find script file…”

The path may be wrong for the installed Office architecture or installation type. Try both Program Files and Program Files (x86), test the path with and without root, and confirm that you opened an elevated Command Prompt.

ospp.vbs produces no useful result

This is expected with Microsoft 365 Apps and subscription Project or Visio. Use account sign-in and Microsoft’s Microsoft 365 activation troubleshooting tools instead.

CMD reports success, but Office still requests activation

Close all Word, Excel, Outlook, and other Office processes, then reopen the applications. Office may not refresh its displayed licensing state immediately after script-based activation.

The key is rejected as invalid

A blocked key may be stolen, counterfeit, unauthorized, or obtained through fraudulent resale. Contact the seller for a refund or contact Microsoft Support. Do not download an “activator” or attempt to use a public KMS server.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
OHY XVX MOA Profile Japanese Fuji Mountain Theme PBT Keycaps Set, 140-Key Coffee & Cream Custom Keycaps for US Layout Mechanical Keyboards (Brown/Beige Design with Key Puller)
  • 🗻【Mount Fuji Themed MOA Keycaps】 - 140 keys in Coffee Brown, Elevating Your Typing Experience with Creamy Sound
  • 🗻【Inspiring Mount Fuji Design】These 140 keys Mount Fuji themed MOA keycaps, featuring a rich coffee brown color palette, capture the majestic essence of Japan’s iconic mountain. The artistic depiction of Mount Fuji throughout the design brings a touch of Japanese elegance to your keyboard.
  • 🗻【MOA Ergonomic Layout】Boasting the MOA ergonomic layout, these keycaps are designed with a concave arc that enhances the contact area between your fingers and the keys, providing a smoother and more comfortable typing experience even during prolonged use.
  • 🗻【High-Quality Construction】Crafted from premium materials, these keycaps are not only durable but also resistant to wear and discoloration. The coffee brown color adds a sophisticated and luxurious feel to your keyboard setup.
  • 🗻【Creamy Sound Profile】Experience the pleasure of typing with these keycaps that are tuned to produce a creamy and satisfying sound. The high-quality PBT material ensures each keystroke is met with a soft, yet tactile feedback that typing enthusiasts will appreciate.

Activation works on one PC but not another

A one-time-purchase license may be intended for one computer. Check that the second installation has its own eligible license rather than reusing the first computer’s key.

KMS activation fails

Connect to the organization’s network or VPN and ask the administrator to check DNS service records, the KMS host’s Office configuration, firewall access, the configured port, and the host name.

MAK activation fails behind an authenticated proxy

MAK activation requires internet access and may fail when the connection requires proxy authentication. Telephone activation may be necessary.

Commands that will not activate Office

slmgr.vbs /ato manages Windows activation and related Windows licensing functions; it is not the Office client activation command. Office and Windows licensing are configured separately.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Likewise, /rearm is not a permanent activation command. It resets licensing status or extends a supported activation state; it does not create a license for an unlicensed installation.

Final verification

  1. Run /dstatus or /dstatusall if your installation supports ospp.vbs.
  2. Close and reopen all Office applications.
  3. Open File > Account and review Product Information.
  4. For Microsoft 365 Apps, verify that the correct account appears under the signed-in user and that the subscription is active.

If activation remains unsuccessful, check whether the Office edition supports the method, whether the key and script path are correct, whether the network or proxy is blocking activation, and whether required organization infrastructure is available.

FAQ

Can I activate Microsoft 365 Apps with CMD?

No. Microsoft 365 Apps normally use account-based activation. Open an Office app and sign in with the Microsoft or work/school account associated with the license.

What does the Office CMD activation command do?

For supported perpetual or volume editions, cscript “path-to-ospp.vbs” /act asks Office to activate an installed, valid license. It does not create a license or bypass product-key requirements.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why can’t CMD find ospp.vbs?

The script path may not match the Office architecture or installation type. Try both Program Files folders and paths with and without root\Office16.

Is KMS activation suitable for a home computer?

Only if the computer belongs to an organization with an authorized KMS host or Active Directory-based activation infrastructure. KMS is not a legitimate activation method for a personal retail copy.

Can I see my complete Office product key from CMD?

No. /dstatus shows only the last five characters of an installed key.

What should I do if Office says the product key has already been used?

Sign in to the Microsoft account that originally redeemed the key. A redeemed key generally does not need to be entered again.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The Bottom Line

Use ospp.vbs only for a supported perpetual or volume-licensed Office installation and a legitimate key or organization activation service. For Microsoft 365 Apps and most consumer Office 2019, 2021, and 2024 installations, sign in through the licensed Microsoft account instead. If CMD activation fails, verify the Office path and edition before troubleshooting the network or key.

References: Microsoft’s Office volume activation tools and Microsoft’s Office activation guidance.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.