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

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.

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

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.
  • 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: Copy below code 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

Detect-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.
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 Deployment Progress

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

17 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
      • 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

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

      Reply

Leave a Comment