A PowerShell script to silently uninstall all versions of Microsoft Office using the official Microsoft Support and Recovery Assistant (SaRA).
- Downloads the latest SaRA command-line tool from Microsoft.
- Extracts the tool to a temporary directory.
- Terminates running Office processes.
- Executes the SaRA tool to silently remove all Office versions.
- Removes all temporary files and folders.
Requires administrator privileges to run. A system restart is recommended after completion.
This script executes the following command to perform the uninstallation:
SaRAcmd.exe -S OfficeScrubScenario -AcceptEula -OfficeVersion All