How to Uninstall Windows Applications using Intune
Updated: Feb 3
SUMMARY: |
By using the tools provided by Intune, you can uninstall almost any Windows application even if it wasn't originally deployed with Intune! Please see the options below: |
Table of Contents
Uninstalling MSI Applications
Option 1: Use Intune's Uninstall Feature
IMPORTANT: |
Only use this option if you initially used Intune to deploy the MSI application. |

Launch the Endpoint Manager (Intune) portal.
Select Apps in the left-hand menu blade, and then select Windows.
Select the application you wish to uninstall.
Select Properties in the middle menu pane and select Edit next to the Assignments header.

Under the Uninstall header, add the appropriate user/device group or select all devices (note that you may have to first remove the assignment under the Install header).
Option 2: Use a PowerShell Script to Uninstall MSI Applications
Since we can use Intune to deploy PowerShell scripts to Windows devices, we can use PowerShell scripts to uninstall applications not deployed with Intune (you can also use this method for apps deployed by Intune). To learn more about how to deploy scripts using Intune, click the link below: Deploying PowerShell Scripts using Intune (Windows)
IMPORTANT: |
To uninstall an application with a script, you must execute the script with elevated permissions. Remember: if you run the script under the user context (use logged on credentials = yes) and the user is a local admin, then the script will run with elevated permissions; otherwise, run the script under the system context (use logged on credentials = no). |
Script Option 1: Use the MSI's Product Code
TIP: |
This script is best for uninstalling a single application. |
Script Summary: the script uses the start-process command to execute the msiexec.exe application and lists the uninstall parameters. Use this script if you know the MSI application's product code and if there is only one product code. Some applications' product codes may change with newer versions. If multiple product codes may exist for the same application, use the script under Option 2.
NOTE: |
If you have the MSI file, you can use a program like Orca to inspect the MSI property table and retrieve the product code. If the application is installed on your machine, you can search the registry for the product code using the registry paths below. Once you find the application subkey, select it to search the value entries for the product code.
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall |
Script Option 2: Use the MSIs' Product Codes and a Foreach Loop
TIP: |
This script is best for uninstalling multiple applications. |
Script Summary: the following script searches the Registry for any application that matches a defined name, then uses a foreach loop to uninstall each application.
Script Option 3: Use the PackageManagement Module
Script Summary: with PowerShell 5.0 came the packagemanagement module which provides several cmdlets that allow you to get, add, and delete packages from several package providers.
To check whether you can use the packagemanagement module to uninstall an application, run the get-package command below on a computer with the application already installed.
get-package -Name <insert_AppName>
If a result is returned, use the script below to uninstall the application.
NOTE: |
The -name parameter for the uninstall-package cmdlet does NOT accept wildcards. If you need to use the wildcard feature, use it with the get-package cmdlet since it accepts wildcards; store the output in a variable to be used by the uninstall-package command. |
Script Option 4: Use the Winget Command Line Tool
Remember, winget is a command line tool that Microsoft provides to help install, uninstall, and update applications. To learn more about using winget to uninstall applications; click the link below:
Uninstalling EXE Applications
Option 1: Use Intune's Uninstall Feature
Remember that there is not an explicit EXE application deployment method with Intune. You can, however, use the Windows App (Win32) app deployment method. If you used this method, you were prompted to define an uninstall command.
Intune will execute the uninstall command you provided when you add a group or all devices to the Uninstall section in the Assignments menu. Understandably, the application will only uninstall successfully if Intune has the right uninstall command. To learn more about how to find the right uninstall command for an application, click here.

Launch the Endpoint Manager (Intune) portal
Select Apps in the left-hand menu blade, and then select Windows.
Select the application you wish to uninstall.
If you need to change the uninstall command, select Edit next to the Program header, otherwise, move to the next step.
Select Properties in the middle menu pane and select Edit next to the Assignments header.

Under the Uninstall header, add the appropriate user/device group or select all devices (note that you may have to first remove the assignment under the Install header).
Option 2: Use a PowerShell Script to Uninstall EXE Applications
Since we can use Intune to deploy PowerShell scripts to Windows devices, we can use PowerShell scripts to uninstall applications not deployed with Intune (you can also use this method for apps deployed by Intune). To learn more about how to deploy scripts using Intune, click the link below: Deploying PowerShell Scripts using Intune (Windows)
IMPORTANT: |
To uninstall an application with a script, you must execute the script with elevated permissions. Remember: if you run the script under the user context (use logged on credentials = yes) and the user is a local admin, then the script will run with elevated permissions; otherwise, run the script under the system context (use logged on credentials = no) |
Script Option 1: Use the Script(s) from the MSI Section
Some EXE applications may have a product code (if an MSI file was nested inside the EXE). If so, use the scripts above to uninstall the EXE using its nested MSI's product code.
Script Option 2: Using the App's Uninstall String found in the Registry
Script Summary: Some EXE applications provide an uninstall command for you! All you have to do is use a PowerShell script to retrieve and execute it.
NOTE: |
Some applications also provide a QuietUninstallString along with an UninstallString. The script below searches for both and uses if statements to run the QuietUninstallString if there is one and then the UninstallString if there is not. |
Before we get to the script, I wanted to provide you with an example where I used PowerShell to view the UninstallString and the QuietUninstallString of an application called Notion, an application I highly recommend! I've removed some of the output to keep the example clear and concise.
Below is the full script:
IMPORTANT: |
If the application's UninstallString or QuietUninstallString is found in the HKEY_CURRENT_USER registry path (the $HKCU variable), then you may need to run the PowerShell Script under the user context in Intune (use logged on credentials = yes). |
Script Option 3: Use the Winget Command Line Tool
Remember, winget is a command line tool that Microsoft provides to help install, uninstall, and update applications. To learn more about using winget to uninstall applications; click the link below:
Uninstalling Microsoft Store Applications
Option 1: Use Intune's Uninstall Feature
IMPORTANT: |
Only use this option if you initially used Intune to deploy the Microsoft Store application. |

Launch the Endpoint Manager (Intune) portal.
Select Apps in the left-hand menu blade, and then select Windows.
Select the application you wish to uninstall.
Select Properties in the middle menu pane and select Edit next to the Assignments header.

Under the Uninstall header, add the appropriate user/device group or select all devices (note that you may have to first remove the assignment under the Install header).
Option 2: Use a PowerShell Script to Uninstall Microsoft Store Applications
Since we can use Intune to deploy PowerShell scripts to Windows devices, we can use PowerShell scripts to uninstall applications not deployed with Intune (you can also use this method for apps deployed by Intune). To learn more about how to deploy scripts using Intune, click the link below: Deploying PowerShell Scripts using Intune (Windows)
Script Option 1: Use the Winget Command Line Tool
Remember, winget is a command line tool that Microsoft provides to help install, uninstall, and update applications. To learn more about using winget to uninstall applications; click the link below:
Cover Picture provided by Freepik
Hello, please tell me how to add a np script to remove a win32 program that does not have an msi code?