Follow these steps to help with uninstalling, reactivating, or installing Office.
To Uninstall All Versions Of Office From Machine:
Download “Office Deployment Tool”
Extract to c:\scripts and rename “setup.exe” to “odt.exe”
Configure a configuration file (XML): https://officedev.github.io/Office-IT-Pro-Deployment-Scripts/XmlEditor.html
3a. I create uninstall.xml at c:\scripts with the following value:
<Configuration> <Remove All="TRUE"/> </Configuration>
- Open Powershell in C:\scripts and run:
& .\odt.exe /configure .\uninstall.xml
To Change A Product Key:
Get new key and copy to a text file so we can copy and paste from.
Run each line one by one in elevated CMD or Powershell:
cd C:\Program Files (x86)\Microsoft Office\Office16 cscript ospp.vbs /dstatus :: shows XQBQ9 cscript ospp.vbs /unpkey:XQBQ9 cscript ospp.vbs /inpkey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX cscript ospp.vbs /act :: Open office, should be activated!
To Deploy Office 365:
- Create a ProPlusInstallGenerator from https://officedev.github.io/Office-IT-Pro-Deployment-Scripts/XmlEditor.html to create a .msi. Alternatively, see about https://github.com/OfficeDev/Office-IT-Pro-Deployment-Scripts under the deployment section. More details:
- Deploy the MSI as part of a task sequence in MDT (imaging), as a GPO, or manually.