Uninstall Zoom with custom detection script
The Zoom Desktop Client
doesn't require admin permissions to install, it is installed in the users appdata and the application is not registered in win32_product
wmi class. This makes detecting where the application has been installed and what version the application is quite difficult. It's therefore best to either remove the user install and replace it with a machine wide installer or completely remove the application.
To do either of these options you first need to remove the application which can be done using the Cleanzoom utility from the Zoom support website. This can then be packaged with a simple install command Cleanzoom.exe /silent
(you can find additional switches for the utility on the vendors site).
To detect the application we will need to use a custom detection script to search all of the users appdata on the machine to identify if Zoom is installed. You can do this using the below code. The below script has been tested via Intune, it may need to be adjusted if being used as a dection script for SCCM.
PowerShell
$parent = "$env:SystemDrive\users\*\Appdata\Roaming\Zoom"
$folders = Get-item $parent
foreach ($folder in $folders){
if (Test-path -path (Join-Path $folder 'bin\Zoom.exe')){
Write-Host "Found it!"
}
}