This script is created to remove all Office versions to prep for other office installation.
Thanks to Admonstrator for creating this script!
Github: https://github.com/Admonstrator/msoffice-removal-tool/
Update 2025-04-29:
Click to reveal
Click to hide
Realised a misstake in the code and fixed it.
Added credits
corrected the url
Update 2025-02-22:
Click to reveal
Click to hide
Here we go:
$tp = "C:\TempPath"
mkdir $tp
Invoke-WebRequest -Uri https://raw.githubusercontent.com/Admonstrator/msoffice-removal-tool/main/msoffice-removal-tool.ps1 -OutFile $tp\msoffice-removal-tool.ps1
cd $tp
powershell -ExecutionPolicy Bypass .\msoffice-removal-tool.ps1 -SuppressReboot -Force
Start-Sleep -s 600
del cd $tp\msoffice-removal-tool.ps1
Exit