Follow the instructions in this blog post to easily uninstall all versions of Zoom from the user’s devices using Intune. I have provided two options for removing the Zoom App: one using a Powershell script and the other using a cleanzoom program.
Cleanzoom is contained within a zip file. Extracting the zip file’s contents will show the cleanzoom.exe file, which you can use to remove the app. Let’s check both options.
Step-by-Step guide
Table of Contents
Option 1 – Use a Powershell script to Uninstall Zoom App
To remove the Zoom App using a Powershell script, follow the below steps:
Step 1 – Prepare a Powershell script
I have created a PowerShell script and tested it to ensure it effectively removes the Zoom app. You can download the removeZoom.ps1 script from my Github Repository: Powershell-Scripts/Zoom/removeZoom.ps1 and save it somewhere on your device.
This Powershell script does not require changes; you can deploy it as is. Once the deployment is complete, the Zoom app will be removed from the users devices.
Step 2 โย Deploy Powershell Script
The next step is to deploy this PowerShell script, using Intune admin center. I’ve created a step-by-step guide on how to deploy a PowerShell script using Intune. Please refer to that and deploy the script to remove Zoom app.
Option 2 – Use CleanZoom Utility to Uninstall Zoom App
The second option is to use a CleanZoom program provided by the software vendor to remove the Zoom app from the user’s device. Please follow the below steps to remove Zoom using CleanZoom.
1. Download Cleanzoom
Download the Cleanzoom utility from Zoom’s support website and Extract its contents into a folder.
2. Prepare a Powershell script file
Now, let’s create a PowerShell script file. I’m using cleanzoom.exe in the script below with the /silent switch. This combination ensures the Zoom client is uninstalled from the device silently, without user interactions or prompts displayed on the screen.
- Copy the below line of code into a file called ZoomUninstall.ps1
ZoomUninstall.ps1
.\cleanzoom.exe /silent
3. Create IntuneWin File
Follow these steps to create an Intunewin file. If you encounter any issues while creating the .intunewin file, refer to my blog post, How to Create an IntuneWin File, for guidance.
- Place CleanZoom.exe and Powershell script into one folder [refer to the screenshot below].
- Download Microsoft Win32 Content Prep Tool and Extract its contents into a folder. For simplicity, I have renamed the extracted folder as IntuneContentPrepTool.
- Create an empty folder, for example, C:\output, or anywhere else.
- Repackage the application folder ZoomUninstall to .intunewin file using IntuneWinAppUtil.exe.
- After completing the command, you can navigate to the C:\output folder where the .intunewin file has been generated. This file will be utilized later when deploying the Intune Windows app (win32).
4. Create a Win32 App deployment on Intune
- Sign in to the Intune Admin center > Appsย >ย All Apps.
- Click onย + Addย and Selectย Windows app (Win32)ย from theย app type.
App Information
Click Select app package file and browse the Intunewin file. Provide Information in the mandatory fields below. The rest of the fields are optional but useful for application documentation and troubleshooting issues.
- Nameย โ Provide a name of the application. For example, Zoom Upgrade 5.11.
- Description โ Provide a useful description.
- Publisher โ Provide Publisher information. For example, Zoom.
Program
- Install command: powershell.exe -Executionpolicy Bypass -File .\ZoomUninstall.ps1
- Uninstall command: powershell.exe -Executionpolicy Bypass -File .\ZoomUninstall.ps1
- Install behavior: System
- Device restart behavior: No specific Action
Requirements
You can specify the requirements that devices must meet to deploy the app. If your devices mix 32-bit and 64-bit types, check the boxes for 32-bit and 64-bit in the Operating system architecture drop-down. Else, go with 64-bit.
- Operating System Architecture: 64-bit
- Minimum operating system: Select the minimum OS requirement for this deployment.
Detection Rules
- Please copy the code below into a text file and save it as Check-ZoomInstallation.ps1.
- Rule format: Use a custom detection script.
- Script file: Browse to Check-ZoomInstallation.ps1
- Run script as 32-bit process on 64-bit clients: No
- Enforce script signature check and run script silently: No
Check-ZoomInstallation.ps1
<#
.SYNOPSIS
This script checks for the presence of Zoom installation in user profiles and Program Files.
.DESCRIPTION
The script iterates through user profiles under
C:\Users\ (excluding 'Public') and checks if Zoom is installed
in each user's profile. It also checks the Program Files directory
for Zoom installation. If Zoom is not detected, it exits with code 0 (success).
If detection occurs, it exits with code 1 (failure).
.NOTES
File Name : Check-ZoomInstallation.ps1
Author : Jatin Makhija
Prerequisite : PowerShell 4.0 or later
Copyright 2023 - Cloudinfra.net
#>
# Get a list of user profiles under C:\Users\ (excluding 'Public')
$Users = Get-ChildItem "C:\Users\" | Where-Object { $_.Name -ne 'Public' } | Select-Object -ExpandProperty Name
# Iterate through each user's profile
foreach ($User in $Users) {
try {
# Construct the user's profile path
$ProfilePath = "$env:SystemDrive\Users\$User\AppData\Roaming"
# Check if Zoom is installed in the user's profile
$ZoomInstalled = Test-Path -Path (Join-Path $ProfilePath 'Zoom\bin')
# Check if Zoom is installed in the Program Files directory
$ZoomInstalled2 = Test-Path -Path "C:\Program Files\Zoom\bin"
if (!($ZoomInstalled -or $ZoomInstalled2)) {
# If Zoom is not detected, print a message and exit with code 0 (success)
Write-Output "CloudinfraOutput - Not Detected Zoom on $User's PC"
Exit 0
} else {
# If Zoom is detected, continue to the next user profile
Write-Output "CloudinfraOutput - Detected Zoom on $User's PC"
Exit 1
}
} catch {
# Handle any exceptions and log the error
Write-Output "Error checking $User's profile: $_"
Exit 1
}
}
# If no detection occurred, exit with code 1 (failure)
Exit 1
- Dependencies – Click Next.
- Supersedence – Click Next.
Assignments
Click onย Add groupย to add an Entra security group containing users or devices. You can also click onย Add all usersย orย Add all devices.
Review + Create
Review the deployment and click on Create to start the deployment process.
Monitoring
Intune admin centerย > Appsย >ย All apps. Click on the deployment and checkย the Overviewย page to show the deployment status.
Sync Intune Policies
The device check-in process might not begin immediately. If youโre testing this policy on a test device, you can manually kickstart Intune sync from the device itself or remotely through the Intune admin center.
Alternatively, you can use PowerShell to force the Intune sync on Windows devices. Restarting the device is another way to trigger the Intune device check-in process.
End-user Experience
After successfully completing the deployment, Zoom will be silently removed from the userโs devices in the background. Users may see a pop-up notification related to the deployment, which is configurable using the Show all toast notifications setting.
What are you doing to avoid a uninstall and reinstall loop from occurring. I see you didn’t specify any requirements other than the system architecture and operating system
Hi Miguel,
Detection logic will check for the app installation. You could add a unique detection logic which will prevent this loop. I will test this scenario and update.
[UPDATE]:Post has been updated to fix this Issue.
Perfectly done. Worked out great Jatin. Thank you!!!
I tried this and for some reason it didn’t remove the Zoom install. I’ve rechecked the steps and ensured the code was correct, still no joy. I and trying this on a single test machine in a specific group, not All Devices (yet…)
Hey Dave, I’ve just updated the blog post. If Cleanzoom isn’t working for you, you can try using a PowerShell script as described in Option 1 and deploy it to your target devices. Hopefully, this will resolve the issue for you.
Thank you. After tinkering with ot a bit, I was finally able to get it to work. The install check script does take a long time for some reason, but eventually it does Uninstaller the Zoom client. Thank you.
I’m happy to hear it’s working! In the end, did you go with Cleanzoom [Option 2] or the PowerShell script [Option 1]?
I used the cleanzoom option. The issue I had was too many test groups, so like anything else, by removing the extra stuff I wasn’t using any more and simplifying the configuration to one machine, one group it worked fine. No with proof of concept, will broaden the coverage to the other machines we want to clean the Zoom client from. Thanks again – this was an easy to follow process. Your instructions were very thorough!
This only worked for me where the very first user folder had Zoom installed. If not detected in the first user folder, it just exits. In looking at your code, that looks like how you have it programmed. Any thoughts on how to fix it so it does loop if Webex is not found in the first user folder?
Hi, do you think this method can be used to remove 7-zip?
Hi, I wanted to use this script but in my environment Zoom is not installed under User-AppData-Roaming but rather C:\Program Files (x86)\Zoom\bin
Could this script be amended to look in C:\Program Files (x86)\Zoom\bin instead?
Thanks
I have this same issue. Where you able to find an amended version for this?
I have amended the script to check Program Files (x86) as well
# Get a list of user profiles under C:\Users\ (excluding ‘Public’)
$Users = Get-ChildItem “C:\Users\” | Where-Object { $_.Name -ne ‘Public’ } | Select-Object -ExpandProperty Name
# Iterate through each user’s profile
foreach ($User in $Users) {
try {
# Construct the user’s profile path
$ProfilePath = “$env:SystemDrive\Users\$User\AppData\Roaming”
# Check if Zoom is installed in the user’s profile
$ZoomInstalled = Test-Path -Path (Join-Path $ProfilePath ‘Zoom\bin’)
# Check if Zoom is installed in the Program Files directory
$ZoomInstalled2 = Test-Path -Path “C:\Program Files\Zoom\bin”
# Check if Zoom is installed in the Program Files (x86) directory
$ZoomInstalled3 = Test-Path -Path “C:\Program Files (x86)\Zoom\bin”
if (!($ZoomInstalled -or $ZoomInstalled2 -or $ZoomInstalled3)) {
# If Zoom is not detected, print a message and exit with code 0 (success)
Write-Output “CloudinfraOutput – Not Detected Zoom on $User’s PC”
Exit 0
} else {
# If Zoom is detected, continue to the next user profile
Write-Output “CloudinfraOutput – Detected Zoom on $User’s PC”
Exit 1
}
} catch {
# Handle any exceptions and log the error
Write-Output “Error checking $User’s profile: $_”
Exit 1
}
}
# If no detection occurred, exit with code 1 (failure)
Exit 1
Hello,
I could use some help (powershell n00b here):
The Check-ZoomInstallation.ps1 script does not appear to recurse correctly. When I check the IntuneManagement logs, or if I try to run it manually, the script stops processing at the first user account (defaultuser0) and does not check the rest of the child accounts.
I do not see the $User variable getting set in the code before the ‘foreach’ command is run.
Hi, I had a similar problem. It would only run the loop against the first user in the $users variable, then Exit.
To get round it I just removed line 38 ‘Exit 0’.
I’m not saying this is a fix, however it did the necessary for our environment
Ditto. Zoom installed at C:\Program Files\Zoom\bin\zoom.exe. No error message, but also didn’t uninstall. Used the *.ps1
Hi Just going with Option 1 but getting an error reported in Intune , but the script worked and removed Zoom on the device.