Cscript Commands:
1) Open the Command Prompt As (Admin) or PowerShell As (Admin).
Execute the command that belongs to your version:
Office 2010: cd C:\Program Files (x86)\Microsoft Office\Office14
Office 2013: cd C:\Program Files (x86)\Microsoft Office\Office15
Office 2016: cd C:\Program Files (x86)\Microsoft Office\Office16
If Cmd Not Find The Folder So Try Replace “Program Files (x86)” To “Program Files”
2) To installed product key Run The Command:
cscript ospp.vbs /inpkey:XXXXX
Example:
cscript ospp.vbs /unpkey:value:XXXX-XXXX-XXXX-XXXX-XXXX
Or
cscript "C:\Program Files (x86)\Microsoft Office\Office16\OSPP.VBS" /inpkey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
Replace the XXXXX with your full product key of Office To uninstall product key, Run The Command:
3) To uninstall product key, Run The Command:
cscript ospp.vbs /unpkey:XXXXX
Replace the XXXXX with the last five character of the currently installed product key
4) if you have duplicates Product Key:
cd /d %ProgramFiles%\Microsoft Office\Office16&cscript ospp.vbs /unpkey:XXXXX&cscript ospp.vbs /act
Example:
cd /d %ProgramFiles%\Microsoft Office\Office16&cscript ospp.vbs /unpkey:KHXM9&cscript ospp.vbs /act
This Article Was Written By Matan Sigavker