13 lines
603 B
PowerShell
13 lines
603 B
PowerShell
# 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 }
|