Skip to main content

Office Universal Uninstaller

Summary​

This script downloads the offscrub files from the repository and then attempts to uninstall all versions of Microsoft Office from 2007 to 2016 & O365. It can handle machine or software corruption and completely removes Office app shortcuts for the version.

Sample Run​

Sample Run

Dependencies​

Invoke-OfficeScrub

User Parameters​

NameExampleRequiredDescription
Arguments-office16TrueThe user parameter values are: -office03, -office07, -office10, -office13, -office16, -officec2r, -All. You can use combinations of the -officexx values. For example: -office03 -office13 -officec2r. Alternatively, you can use -All to uninstall any Office applications. By default, the value is set to -All, which means you can directly schedule this script, and it will uninstall any Office applications.

Implementation​

To implement this script, please create a new "PowerShell" style script in the system.

Implementation

Name: Office Universal Uninstaller
Description: This task will download the offscrub files from the repository and then attempt to uninstall all versions of Microsoft Office from 2007 to 2016 & O365. It can handle machine or software corruption and completely removes Office app shortcuts for the version.
Category: Custom

Implementation Category

Parameter​

Parameter

Parameter Names: Arguments
Required Field: Selected
Parameter Type: Text String
Default Value: -All

Script​

Row 1 Function: Script Log​

Row 1 Function

Input the following:

Input

Row 2 Function: PowerShell Script​

Row 2 Function

Paste in the following PowerShell script and set the expected time of script execution to 900 seconds.

PowerShell Script

Row 2 Function Output

Row 3 Function: Script Log​

Row 3 Function

In the script log message, simply type %output% so that the script will send the results of the PowerShell script above to the output on the Automation tab for the target device.

Row 3 Function Output

The final task should look like the screenshot below.

Final Task Screenshot

Script Deployment​

The script is intended to run manually at this time.

Go to Automations > Tasks.
Search for Office Universal Uninstaller.
Then click on Schedule and provide the parameter details as necessary for the script completion.

Script Deployment

Output​

  • Script log

Changelog​

2025-05-02​

  • Initial version of the document