From 36711d874417e8efd2dae887d58e3c5cdbd95d77 Mon Sep 17 00:00:00 2001 From: David Yoder Date: Wed, 10 Aug 2022 10:32:42 -0400 Subject: [PATCH] initial commit --- Uninstall-MicrosoftOffice.ps1 | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Uninstall-MicrosoftOffice.ps1 diff --git a/Uninstall-MicrosoftOffice.ps1 b/Uninstall-MicrosoftOffice.ps1 new file mode 100644 index 0000000..611fe93 --- /dev/null +++ b/Uninstall-MicrosoftOffice.ps1 @@ -0,0 +1,13 @@ +# URL to the OffscrubC2R.vbs script +$UninstallScriptURL = 'https://github.com/OfficeDev/Office-IT-Pro-Deployment-Scripts/raw/master/Office-ProPlus-Deployment/Deploy-OfficeClickToRun/OffScrubc2r.vbs' + +# The path to the local script once downloaded +$UninstallScript = Download-File -URL $UninstallScriptURL + +# Args to pass to the OffscrubC2R.vbs script +$ScriptArgs = "/ALL /QUIET /NOCANCEL" + +# Run the script +LogMsg "Uninstalling all Click2Run versions of Office" +Try { Start-Process "cscript.exe" -ArgumentList "//nologo ""${UninstallScript}"" ${ScriptArgs}" -Wait } +Catch { LogErr $_.Exception.Message } \ No newline at end of file