Dein DehouwerSerious about technology
Remove persistent Microsoft 365 Office license keys

Remove persistent Microsoft 365 Office license keys

Ever had a client call you because their Office license expired? Even when the subscription is yearly, and in Microsoft 365 admin portal you can not find any cause related to expiring licenses?

Well… it may be because the end-user has multiple licenses installed on their computer for Office. It happens for various reasons, mostly this is caused by a recent change, the license got upgraded from Microsoft 365 Business Standard to Premium for example.

In the background, the old license will still be active in a grace period, it will afterwards expire by itself and the new license will take precedence. But a notice will appear a couple months before it will expire. The confusion caused by seeing a expiring message appear will trigger the end-user in contacting the helpdesk.

Steps to remove an Office license

It is quite easy to resolve this issue following these steps.

  1. Open Command Prompt with administrator rights either:
    • By pressing the Windows key and starting to type CMD
    • By pressing the Windows key + R , typing CMD in the box that appears and press Enter
  2. Type (or copy-paste) this command, depending on 32-bit or 64-bit installation, you will have to remove the (x86):
    • cd C:\Program Files (x86)\Microsoft Office\Office16 and press Enter
  3. Next command:
    • cscript ospp.vbs /dstatus and press Enter
  4. Take a note of all the license keys
Command Prompt showing all Office licenses
  1. Remove a key by using this command:
    • cscript ospp.vbs /unpkey:KEY <= where KEY needs to be replaced with your key
    • Press Enter
  2. Verify the key is removed by using the command from step 3
  3. Verify that the issue is resolved by going to an Office application and go to File > Office account , this now should say that you have a valid license.
An overview of the subscriptions


What I recommend is when rolling out new licenses to just login to the devices and remove the old key preventively. It will save you and others frustration later on.

Join the discussion

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Dein Dehouwer

Recent Comments