If Windows shows an old, duplicate, or previously-used (cracked) Microsoft Office product key, you can remove it from the command line before entering your new genuine key. This works for Microsoft Office 2010 through 2024 (one-time purchase / perpetual editions).
Part 1: Check the Office license status
Open Command Prompt as administrator and change into your Office program folder with cd. The path depends on your Office version:
Office 2016 / 2019 / 2021 / 2024 (64-bit):
cd C:\Program Files\Microsoft Office\Office16Office 2016 / 2019 / 2021 / 2024 (32-bit):
cd C:\Program Files (x86)\Microsoft Office\Office16Note: “Office16” is the folder name for Office 2016–2024. For Office 2013 use Office15, and for Office 2010 use Office14.
Now check the current license status:
cscript ospp.vbs /dstatusThis lists any installed product keys along with the last 5 characters of each key.
Part 2: Remove the existing / cracked product key
Use the /unpkey switch with the last five characters of the key you want to remove (from the /dstatus output):
cscript ospp.vbs /unpkey:XXXXXReplace XXXXX with the last five characters of the product key. This removes that activation key from your system. If more than one key is listed, repeat the command for each key you want to remove.
Part 3: Activate with your genuine key
Once the old key is removed, open any Office app (Word, Excel, etc.), go to File → Account, choose Change Product Key, and enter the new 25-character product key we sent you. Office will then activate as genuine.
Notes
- Always run Command Prompt as administrator, or the commands will fail.
- If
ospp.vbsis not found, make sure you are in the correct Office folder (Office14 / Office15 / Office16). - Removing the key does not uninstall Office — it only clears the activation so you can enter a fresh key.















