Uninstall MSI application
  • 27 Sep 2023
  • 1 Minute to read
  • PDF

Uninstall MSI application

  • PDF

Article summary

The following PowerShell script helps IT Admins to uninstall an MSI application from the managed Windows devices.

  • Create a file on your desktop, for example, uninstall_application_msi-installer.ps1 and open it in a text editor like notepad++
  • Copy the contents below to the file or click here to download the file.
    #Script to uninstall an application which was installed by MSI Installer
    #app name as it appears in "Name" column of Add-Remove Programs
    $appname = "App_Name"
    Get-Package -Name $appname | Uninstall-Package

  • Please replace the "App_Name" with the name of the application that is to be installed in the above script. Please make sure that you add the name as it appears in Name column in Add or Remove Programs section on a Windows device.
  • Follow our guide to upload & publish the PowerShell script using Scalefusion Dashboard.
  • Once the script is successfully executed, you will be able to see the status of the same in the View Status report on the Scalefusion dashboard.
  • Click on the PowerShell script and click on the View Status. Executed means that the script has successfully run on the device.
Please note that to use the PowerShell scripts, the Scalefusion MDM Agent Application must be installed on the device(s). Please follow our guide to publish and install the Scalefusion MDM Agent Application.

The scripts and their contents are sourced from various albeit authenticated Microsoft sources and forums.

Please validate the scripts on a test machine before deploying them on all your managed devices.

Scalefusion has tested these scripts, however, Scalefusion will not be responsible for any loss of data or system malfunction that may arise due to the incorrect usage of these scripts.

Was this article helpful?