Invoke-OfficeScrub
Description
Allows the uninstallation of Microsoft Office products via OffScrub.
Usage
- Ensures that the session is elevated; if not, it warns and exits.
- Determines what switches you entered and sets up an object with the file download locations.
- If no switches are present, it warns and exits.
- Loops through all the switches, downloading and executing them.
.\Invoke-OfficeScrub.ps1 -Office03
Uninstalls detected Office 2003 installs.
.\Invoke-OfficeScrub.ps1 -Office03 -Office10 -Office16
Removes all detected instances of Office 2003, 2010, and 2016.
.\Invoke-OfficeScrub.ps1 -All
Removes all installed versions of Office.
Parameters
| Parameter | Alias | Required | Default | Type | Description | 
|---|---|---|---|---|---|
| Office03 | False | Switch | Uninstalls Office 2003 | ||
| Office07 | False | Switch | Uninstalls Office 2007 | ||
| Office10 | False | Switch | Uninstalls Office 2010 | ||
| Office13 | False | Switch | Uninstalls Office 2013 | ||
| Office16 | False | Switch | Uninstalls Office 2016 | ||
| OfficeC2R | False | Switch | Uninstalls Office Click to Run | ||
| All | False | Switch | Uninstalls all above Office versions | 
Output
- .\Invoke-OfficeScrub-log.txt
- .\Invoke-OfficeScrub-error.txt