logo
search
Uninstall & Reinstall Issues

How to Uninstall Microsoft Office from the Command Line Using ODT

Maira MehtabMaira Mehtab Sep 22, 2026 869 views

Question details

The user is looking for an automated, command-line method to uninstall Microsoft Office across multiple endpoint devices without relying on traditional WMIC commands.

Product
Microsoft Office
Device & OS
Windows
Scenario
Removing Office applications efficiently across multiple endpoints via automated scripts or deployment jobs.
Observed behavior
Requires a reliable command-line tool and configuration file setup to initiate the uninstallation natively.
Before you start

Ensure you have local administrative privileges on the target endpoints and know the exact Product ID and language codes of the Office installations you intend to remove.

Solution 1Recommended

Uninstall Microsoft Office Using the Office Deployment Tool

Use the official Office Deployment Tool (ODT) and a configuration XML file to reliably automate the removal of Office applications.

The Office Deployment Tool is Microsoft's recommended method for managing Office installations across multiple endpoints. It replaces older methods like WMIC commands and allows for highly customizable XML-based configurations.

1
Download and Extract the ODT

Navigate to the official Microsoft website to download the Office Deployment Tool. Run the downloaded executable to extract the setup.exe file and sample XML files to a local directory.

2
Create a Configuration XML File

Using a text editor, create a configuration file (e.g., config.xml). Specify the Office product ID and language you wish to remove using the <Remove> element.

3
Launch Command Prompt as Administrator

Click the Windows Start button, type 'cmd', right-click on 'Command Prompt', and select 'Run as administrator'.

4
Execute the Uninstallation Command

Use the 'cd' command to navigate to the directory where you extracted the ODT. Run the command 'setup.exe /configure config.xml' to begin the uninstallation.

Automating Multiple Endpoints: The exact same config.xml file can be integrated into your endpoint management software or automated jobs to remove Office across numerous machines, provided they have matching configurations.
Free Microsoft Office alternative

Switch to WPS Office for a Lighter, Faster Experience

If you are removing Microsoft Office to free up system resources or reduce software licensing costs across your organization's endpoints, WPS Office provides an exceptional, cost-effective replacement.

  1. 1. Download WPS Office: Visit the official WPS website and download the free installation package for your operating system.
  2. 2. Install the Software: Run the lightweight installer and follow the on-screen instructions to set up the suite on your device.
  3. 3. Open and Edit Documents: Launch WPS Office to immediately open your existing Word, Excel, or PowerPoint files without formatting loss.
Fully compatible with major Microsoft Office formats including DOCX, XLSX, and PPTX.Lightweight installer that consumes significantly less disk space and system memory.Familiar tabbed interface requiring zero learning curve for transitioning teams.Completely free to download and use for essential document creation and editing.
microsoft office alternative - wps office

Frequently Asked Questions

Can I still use WMIC commands to uninstall Microsoft Office?

While WMIC uninstall commands have been used historically, they are heavily deprecated and often fail on modern Office installations. The Office Deployment Tool (ODT) is the recommended and supported method.

How do I make the command line uninstallation completely silent?

To perform a silent uninstallation that requires no user interaction, you can add the display level attribute <Display Level="None" AcceptEULA="TRUE" /> inside your configuration XML file.

Can I reuse the same XML file for endpoints with different Office versions?

The XML file specifies particular Product IDs and language codes. You can only reuse the exact same XML file if the endpoints have matching product and language configurations. Otherwise, you must create distinct XML files for different Office versions.