How to Uninstall Microsoft Office from the Command Line Using ODT
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.
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.
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.
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.
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.
Click the Windows Start button, type 'cmd', right-click on 'Command Prompt', and select 'Run as administrator'.
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.
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. Download WPS Office: Visit the official WPS website and download the free installation package for your operating system.
- 2. Install the Software: Run the lightweight installer and follow the on-screen instructions to set up the suite on your device.
- 3. Open and Edit Documents: Launch WPS Office to immediately open your existing Word, Excel, or PowerPoint files without formatting loss.

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.




