Forum Discussion
Jesse13579
Sep 13, 2024Brass Contributor
remove click to run with intune script
I'm trying to remove the en-us, es-es, and fr-fr versions of office clicktorun on my pcs to free up space and clean them up. I'm running this script via intune: <# Sample Data: "scenario=in...
SebastiaanSmits
Sep 26, 2024Iron Contributor
Hi,
I use the following script:
$OfficeUninstallStrings = ((Get-ItemProperty "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*") | Where {$_.DisplayName -like "*Click-to-Run*"} |Select UninstallString).UninstallString
ForEach ($UninstallString in $OfficeUninstallStrings){
$UninstallCommand = (($UninstallString -split ' ')[1] -replace '/I','/X') + ' /q'`
Start-Process msiexec.exe -ArgumentList $UninstallCommand -Wait}
,
Regards