<link href="https://fonts.googleapis.com/css?family=Roboto:100,100italic,200,200italic,300,300italic,400,400italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic&amp;display=swap" rel="stylesheet"/>
4 minutes reading time (767 words)

Uninstall an Application using PowerShell and Endpoint Manager

How to silent uninstall an MSI application using msiexec with PowerShell then use Endpoint manager to deploy the script to a group of computers.


The first part of this article covers how to silent install and uninstall applications from the command line using msiexec from both command prompt and PowerShell. Once we have a working PowerShell script to uninstall the application, we can use Endpoint manager to deploy the script to a group of computers.

This example is for uninstalling Nitro Pro PDF Editor v12, but the steps will be the same for removing any MSI based application using a PowerShell script with Endpoint Manager.

Table of Contents


Install and uninstall MSI applications using msiexec

msiexec can be used to manage applications using Windows Installer from the command line

msiexec options
/i install
/qn quiet, no user interface
/x uninstall

Example: silent install Nitro Pro using a transforms .mst file
msiexec /i "C:\Temp\nitro_pro12_x64.msi" TRANSFORMS="C:\Temp\nitro_pro12_x64.mst" /qn

Example: silent uninstall Nitro Pro
msiexec /x [installation id] /qn

Get application product ID using PowerShell

To uninstall the application, we will need to get the application product ID or product GUID using PowerShell

# Get name "Nitro Pro"
Get-CimInstance -Class Win32_Product | Where-Object Name -eq "Nitro Pro" | fl

# Get name using wildcard *
Get-CimInstance -Class Win32_Product | Where-Object Name -like "*Nitro*" | fl
 
# Get all applications
Get-CimInstance -Class Win32_Product | ft -autosize 

Silent uninstall an application using msiexec (Command prompt)

Example: Silent uninstall Nitro Pro PDF v12 using msiexec from the Command prompt

msiexec /x E7379322-0E5B-4410-A006-91CE28BE652B /qn

Silent uninstall an application using msiexec (PowerShell)

To run msiexec using PowerShell, we will need to use Start-Process and -Argument for the options

Example: Silent uninstall Nitro Pro PDF v12 using msiexec from PowerShell

Start-Process msiexec.exe -Argument "/x {E7379322-0E5B-4410-A006-91CE28BE652B} /qn"

Uninstall an application using an Endpoint Manager script

Create a device group for deployment

Logon to Endpoint Manager admin center
https://endpoint.microsoft.com

Groups - new group

Group type: Security
Group name: Nitro Pro 12 Uninstall
Membership type: Assigned
Create

Deploy PowerShell uninstall script

Devices - Scripts
Add - Windows 10 and later

Name: Nitro Pro 12 Uninstall

Browse for the PowerShell uninstall script
Leave the script settings as the defaults.

# nitro-pro-12-uninstall.ps1
# uninstall Nitro Pro 12 using PowerShell
Start-Process msiexec.exe -Argument "/x {E7379322-0E5B-4410-A006-91CE28BE652B} /qn" 

Assign the script to the device deployment group we created

Included groups - Add groups
Select the group "Nitro Pro 12 Uninstall"

Assignments - Click Next

Review the changes, then click Add

Check the status of script deployment

Check script deployment from the Endpoint Management admin center

Devices - Scripts - Nitro Pro 12 Uninstall

You can see the number of devices that have run the script successfully and any with errors

Check script deployment on the client computer

On the client computer, you can check the Intune Management Extension logs in this folder
C:\ProgramData\Microsoft\IntuneManagementExtension\Logs

Open the log file IntuneManagementExtension.log and filter for PowerShell
You will see log messages showing the PowerShell script being run on the client 

You will also see success or failure messages

Related Posts

 

Comments

No comments made yet. Be the first to submit a comment
Already Registered? Login Here
Tuesday, 16 September 2025
You can help support this website by buying me a coffee!
Buy Me A Coffee