Skip to main content

Worklet to remove Zoom

  • December 4, 2020
  • 4 replies
  • 328 views

Evaluation Code:

if(test-path -Path "%APPDATA%/Zoom"){Exit 1}

Remediation Code:

$process = Start-Process -File-Path "%APPDATA%\Zoom\Zoom\uninstall\Installer.exe" -ArgumentList "/uninstall" -PassThru
Exit $process.ExitCode

4 replies

  • Rookie
  • December 7, 2020

Hi @TechieOneKenobi

Thanks for this. I have been meaning to look into removing zoom for a while.

Im not sure why but I cannot resolve the %appdata% file path. I had to set a variable of the file path first to get it and then use that variable to remove zoom. Like bellow.

$appdata = Resolve-Path "C:\users\*\appdata\roaming\zoom\uninstall\Installer.exe"
Start-Process -FilePath $appdata -ArgumentList "/uninstall"

Also I’m pretty sure that you have a typo in there on “-File-Path”, shouldn’t it be -FilePath.


You are correct on the -FilePath, unfortunately I cannot edit it. As for not being able to resolve the &APPDATA% path, I’d check the environment variables.


Maikel
Forum|alt.badge.img
  • Channel Partner
  • December 7, 2020

this properly has to do with running in system context instead or user context. The variable is not available as system.


Nic-Automox
  • Former Automox Employee
  • December 7, 2020

There is a wrapper using scheduled tasks that I made (thanks to @rich for the original code) to workaround this problem:

We’re also looking at a potential future improvement to worklets where we let you specify System or currently logged in user for the code running.