How to Uninstall Zoom using Intune

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 cleanroom 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.

How to deploy Zoom using Intune

Step-by-Step guide

Option 1 – Use a Powershell script to remove Zoom

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. You can start directly from STEP 2, as we’ve already prepared our PowerShell script in STEP 1.

Another alternative is to use Intune Remediations to deploy this PowerShell script. However, when using the Device remediations option, you will need the Detection and the remediation scripts.

To learn more about Intune remediations, refer to my other step-by-step guide on deploying a PowerShell script using Intune Device Remediations. The guide is titled Block USB Drive Access on Windows Using Intune Remediations.

Option 2 – Use CleanZoom

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.

  1. Place CleanZoom.exe and Powershell script into one folder [refer to the screenshot below].
Create IntuneWin File
  • 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.
Create IntuneWin File
Create IntuneWin File
  • 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).
Intunewin file created

4. Create a Win32 App deployment on Intune

To deploy the .Intunewin file, we must create a Win32 app deployment via Intune. Follow the below steps:

  • Sign in to the Intune Admin center
  • Click on Apps and then click on 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 unique name of the application. This name will show up on the Company portal app. For example, Zoom Upgrade 5.11
  • Description – Provide a useful description.
  • Publisher – Provide Publisher information. For example, Zoom.
Add Win32 app for Zoom uninstallation and upgrade

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
Configure the Install command, and Uninstall Commands in the Program tab

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
Detection Rules
  • Dependencies – Click Next.
  • Supersedence – Click Next.

Assignments

Click on Add group to add an Azure AD group containing users or devices. You can also click on Add all users or Add all devices.

Assign the app either to Azure AD group or All devices
Assign the app either to Azure AD group or All devices

Review + Create

Review the deployment and click on Create to start the deployment process.

Monitoring

You can follow the below steps to monitor the installation:

From the Microsoft 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.

Show all toast notifications
Show all toast notifications

14 thoughts on “How to Uninstall Zoom using Intune”

  1. 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

    Reply
  2. 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…)

    Reply
    • 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.

      Reply
      • 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.

        Reply
          • 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!

  3. 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?

    Reply
  4. 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

    Reply
  5. 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.

    Reply

Leave a Comment