Remove Microsoft Office Keys via the command line
Sometimes it may be necessary to remove the old Office Key via cmd. To do this, we start the command prompt or cmd as administrator. Then we navigate to the Office installation location
cd C:Program FilesMicrosoft OfficeOffice16
In the next step we read the currently available data for activation:
cscript ospp.vbs /dstatus
You will see all information and the last 5 digits of the installed key.
To remove the key enter the following command (replace XXXXX with the last 5 digits of the key):
cscript ospp.vbs /unpkey:XXXXX
The removal should now be confirmed.