Office Install Tasks

less than 1 minute read

Description:

Follow these steps to help with uninstalling, reactivating, or installing Office.

To Resolve:

To Uninstall All Versions Of Office From Machine:

  1. Download “Office Deployment Tool

  2. Extract to c:\scripts and rename “setup.exe” to “odt.exe”

  3. 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>
  1. Open Powershell in C:\scripts and run:
& .\odt.exe /configure .\uninstall.xml

To Change A Product Key:

  1. Get new key and copy to a text file so we can copy and paste from.

  2. 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:

  1. 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:

https://joshheffner.com/automate-removal-old-office-versions-upgrade-2016/
https://www.systemcenterdudes.com/sccm-2012-office-2016-deployment/

  1. Deploy the MSI as part of a task sequence in MDT (imaging), as a GPO, or manually.