Uninstall Microsoft product trial license or KMS license completely

As you know, the new Microsoft product installation usually includes a 30-days free trial license. However, the problem here is that the trial license is not uninstalled automatically when it is expired. And so this leads to the paradox that it keeps saying “Most features are disabled” or “Windows is not activated” even after activating it using a valid license. Besides, some of you guys who have ever used KMS license to activate your Windows or your Office and now you just want to remove it in order to use another product key. This is similar to the problem I just mentioned. And to address these issues, please do the following steps.

1. Steps to remove your Office license

Step 1.1: Open command prompt as administrator.

Step 1.2: Copy/run this command to determine what is the license key you want to remove.

cscript "%ProgramFiles%\Microsoft Office\Office16\ospp.vbs" /dstatus

If you see an error, try this command.

cscript "%ProgramFiles(x86)%\Microsoft Office\Office16\ospp.vbs" /dstatus

Note: “Office16” is codename of Office 2016. If you are using Office 2010/2013, replace “Office16” with “Office14” or “Office15”.

Determine license you want to remove
Determine license you want to remove

Step 1.3: Copy and run these commands to remove the license. Note: replace “VMFTK” with the last 5 characters of your product key.

cscript "%ProgramFiles%\Microsoft Office\Office16\ospp.vbs" /unpkey:VMFTK

If you see an error, try this command.

cscript "%ProgramFiles(x86)%\Microsoft Office\Office16\ospp.vbs" /unpkey:VMFTK
Office product key is uninstalled successfully
Office product key is uninstalled successfully

Done!

2. Steps to remove your Windows license

Step 2.1: Open command prompt with admin rights.

Step 2.2: Execute this command.

cscript slmgr.vbs /upk&cscript slmgr.vbs /cpky
Windows product key is removed successfully
Windows product key is removed successfully

Done! The license you want to remove is uninstalled successfully.

If you would have any questions or concerns, please leave your comments. I would be glad to explain in more details. Thank you so much for all your feedback and support!

5/5 - (278 votes)

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

110 Comments

  1. Hi Guang, Thank you for sharing. I had followed your steps (to uninstall my office 2019 [for home] product key).
    I kept getting this error ” Input Error: Can not find script file “C:\Program Files\Microsoft Office\Office19\ospp.vbs”.
    or “Input Error: Can not find script file “C:\Program Files (x86)\Microsoft Office\Office19\ospp.vbs”. :

    background : I am using HP Pavilion, Win 10
    My laptop was crashed and SSD storage was changed out. So after repair, I need to re-install everything from scratch.

  2. Thank you so much. I scoured the internet and tried everything and this is the only one that actually solve the problem. Thank you for sharing your knowledge.

  3. Hello! I was able to activate it thank you! 😀
    I have a doubt, there’s a PRODUCT NOTICE saying “There was a problem checking this device’s license status. Please sign in with the Office 365 account this device wasa activated with”
    What can i do about it?

  4. Hi, I am working on the Steps to remove your Office license. After a error with the 1rst command I enter the 2nd command for VMFTK but it says that product key not found. (*Note: the installed product key 27GXM) What I supposed to do now?

    1. Are you sure you’ve pasted the right key?

      The command you need to execute is:

      cscript “%ProgramFiles(x86)%\Microsoft Office\Office16\ospp.vbs” /unpkey:27GXM

  5. thank you very much Guang .
    great troubleshooting
    just had to call microsoft for the last step
    one last step to complete is to click update on the application account page
    now it no longer shows unlicensed.

    thank you again Guang

  6. Mine got Acer Swift 3 with Office 365 TRIAL installed, and to activate it by having credit card while I ain’t got a credit card.. So I buy office 2019 license key and follow this instructions to remove trial license, and it worked. Thanks!

  7. Spot on, not come across this before but your post was the perfect solution.
    I have added this to our knowledge base, thank oyu

  8. Hi, I removed my windows license (which I didnt know) so it was an accident. What should I do now?

  9. does this work for office 365?
    Input Error: Can not find script file “C:\Program Files\Microsoft Office\Office16\ospp.vbs”.
    Input Error: Can not find script file “C:\Program Files\Microsoft Office\Office365\ospp.vbs”.
    Input Error: Can not find script file “C:\Program Files (x86)\Microsoft Office\Office16\ospp.vbs”.
    Input Error: Can not find script file “C:\Program Files (x86)\Microsoft Office\Office365\ospp.vbs”.
    these are all the errors i get.

  10. Hi, I read that pre-installed Office 365 (which coming with manufacturer laptop/PC) with expired trial license will retain the expired status even it uninstalled and re-installed.
    Should the KMS key installed before the trial expired or waiting until the trial key expired?
    I cannot found way to remove trial license for pre-installed Office 365 ini your website.

      1. Already tried and failed.
        I just found out that my pre-installed office 365 is Microsoft Store- installation type, and it seems doesn’t have “%ProgramFiles%\Microsoft Office\” nor “%ProgramFiles(x86)%\Microsoft Office” directory.
        Also, I tried activate the Microsoft Store- installation type office 365 using method mentioned in
        “Legal way to use Office 365 totally FREE, without paying a dime”, but failed.

        Maybe there is different method for both activating and removing trial license in Microsoft Store installation type Office?

        1. Where do you install Office 365? Location?

          Top click Community, create a question with detail, your office 365 location with picture.

          Mr.Guang or others will help you to solve your problem.

  11. Worked without any Problems. Does this mean, the Office Version is working now forever without the restrictions when the “Trial” we deleted runs out?

      1. thanks for the Reply!
        is this legal? and if i run MS now, it wants me so sign in. should i avoid signing in because it would start the Trial again or doesnt it affect it?

        thanks!

        1. Trial pop up again, this only happen if you have more than one windows or office program install in the same PC.

          Control panel, uninstall the one you don’t want to keep, restart PC, enjoy.

          KMS Activation method is approved by MIcrosoft to activate on PC and Laptop.

          Mr Guang keep all activation free to use, if you happy, donation is welcome.

  12. I always get an error that says

    Error: 0xC0020036 On a computer running Microsoft Windows non-core edition, run ‘slui.exe 0x2a 0xC0020036’ to display the error text.

    1. here was a VLMSC DNS record for another DC that is not a KMS server. The pc had a record of this under the HKEY_User\S-1-5-20\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform. Changed that to the actual KMS server and windows activated.

  13. Hi Guang.
    I just bought Office 365 but i have some old license of versions Office 2019 Prof + Office 2016 Pro + and both of this version ask me to activate even though my Office 365 is working fine. How is it possible to remove the two unactivated version and just keep my Office 365.
    I really do hope for your help.
    Best regards
    Simon

      1. Thanks. But I have already tried that. The only version of Office that is installed are Office 365. All other versions are uninstalled and the PC restarted. But the unactivated license reminders keeps coming up when I start my office 365 version.

        1. You bought Office 365, than meant you can reinstall it.

          Google: Office fix tool

          uninstall MS Office 2016 PRO and MS Office 2019 Pro

          restart PC

          1. Thank you for the input. I have now used the Office fix tool and uninstalled all versions of Office on my pc. After that I restarted the pc and made a new installation of Office 365. And righy from the beginning after this installation it asked my for registration of both the 2016 and 2019 Pro plus even though med Office 365 is fully functioning

        2. Google: Uninstall Office from a PC – Office Support

          bottom of the page Uninstall Office manually

          Click in : Manually uninstall Office

          Follow the method, uninstall all Office from PC

          Restart PC

          Try again.

          Remember Office 365, when install will automatic upgrade to Office 2019 (Windows 10), or Office 2016 (Windows 8.1-Windows 7). If you use Office 365 batch file to activate, It will become Office 365 base Office 2016 or Office 2019. If you use Windows 10, will still get upgrade to future Office Program and new feature update. But if you use Office 2016 or Office 2019 batch file to activate, It will become Office 2016 or Office 2019, cannot update to new Office version and no more new feature update.

  14. How can I remove KMS if the last 5 of the installed product key is not presented?

    Basically, my MAK and an KMS is showing as installed. Internet connection is 100% not possible and I cannot get office to prompt for activation. Well, it actually eventually prompts for “telephone” activation. Because of my environment I must perform telephone activation, thus I do not want a grace period. I want my MAK to immediately prompt for telephone activation. Thanks in advance!

  15. I can’t uninstall the office license key, it says that the action requires administrator’s privelege.
    I tried both codes and it still won’t work. Is there any other solution? thanks

    1. all the method show in the post here must use admin Id run online.

      Use the admin Id install windows or create a admin id without modify setting right to run the batch online.

    2. The administrator’s privilege is requiered for an installation / unistallation of any software.
      It’s normal. Contact your administrator.

  16. Thank you for this
    am hour of removing folders registry entries and no joy
    2 minutes of CMD commands and oh look i’m licensed!

  17. hello and thank you for making MSO Professional Plus 2016 available!!

    I used your “activate Microsoft Office 2016 All Versions for Free .bat file run with elevated privileges. Reports activation is successful.

    however I’m confused when i look at account settings it says this needs to be activated however when i click on show additional Licensing information it shows its activated? which do i believe? Thank you for your time and attention.

  18. hi, Guang

    I had been searching for the free activation code for office 2016 professional plus for a while and i think you are one of the expert in this area. Could you help me with the office 2016 activation online. i tried couple times but it keep showing as following:

    The connection to my KMS server failed! Trying to connect to another one… Please wait…

    ============================================================================
    Sorry! Your version is not supported. Please try installing the latest version here: bit.ly/downloadmsp
    i tried to open that like but no valuable information is there.

    Could you direct me what to do next please. Thank you in advance!

    regards
    melanie

  19. Hi Guang,

    I uninstall my pre-installed Office (365 – it expired) in my computer hoping to get a new Office (2019) that will match KMS version (can’t paste the screen shot here). I even removed its license by following your instructions on “How to Uninstall MS Product Trial License and KMS License”. Then installed the 2019 KMS version and run the batch file (as Admin), but still showing that my “Version is Not Supported”. Did reinstall several times and run the batch file several times, still unsuccessful.

    My question is, how to “totally” removed pre-existing Office files in my computer to have a totally new Office version. I believe that there are some files here that saves activities, like, if trial has been expired and tried to uninstall and reinstall the program, computer still knows that trial has been expired even you just reinstall it. So is there a certain “file” to remove, overwrite or alter to change the version or even the Product Key?

    Your help is always appreciated.

    Keep up the good work and keep on helping people.

    Boyet