# Remove-MSIApplications for PSADT 4

**URL:** <https://discourse.psappdeploytoolkit.com/t/remove-msiapplications-for-psadt-4/7329>\
**Category:** Toolkit Features\
**Created:** [February 17, 2026, 2:25pm UTC](https://discourse.psappdeploytoolkit.com/t/remove-msiapplications-for-psadt-4/7329 "2026-02-17T14:25:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bolle01](https://avatars.discourse-cdn.com/v4/letter/b/41988e/32.png) [@bolle01](https://discourse.psappdeploytoolkit.com/u/bolle01)\
**Post date:** [February 17, 2026, 2:25pm UTC](https://discourse.psappdeploytoolkit.com/t/remove-msiapplications-for-psadt-4/7329/1 "2026-02-17T14:25:43Z")

</div>

Hi everyone,

I regularly use Remove-MSIAapplications in PSADT 3.8.4. I've built a suitable equivalent. I'm getting the message that the installation package cannot be opened. Nothing is being uninstalled, and I can still open it afterward. Does anyone have any ideas?

PSAppDeployToolkit.Extensions.psm1

```auto
function Uninstall-MSIByDisplayName {
    [CmdletBinding()]
    param (
        [Parameter(Mandatory = $true)]
        [string]$DisplayName,

        [switch]$ExactMatch,

        [string]$AdditionalArguments = "/qn /norestart"
    )

    Write-ADTLogEntry -Message "Suche installierte MSI-Anwendung mit DisplayName: $DisplayName" -Severity 1

    try {
        if ($ExactMatch) {
            $Applications = Get-ADTApplication | Where-Object {
                $_.DisplayName -eq $DisplayName -and $_.WindowsInstaller -eq $true
            }
        }
        else {
            $Applications = Get-ADTApplication | Where-Object {
                $_.DisplayName -like "*$DisplayName*" -and $_.WindowsInstaller -eq $true
            }
        }

        if (!$Applications) {
            Write-ADTLogEntry -Message "Keine passende MSI-Installation gefunden für: $DisplayName" -Severity 2
            return
        }

        foreach ($App in $Applications) {
            Write-ADTLogEntry -Message "Gefundene MSI-Anwendung: $($App.DisplayName) - ProductCode: $($App.ProductCode)" -Severity 1
            
            if ($App.ProductCode) {
                Start-ADTProcess -FilePath "msiexec.exe" `
                                -ArgumentList "/x $($App.ProductCode) $AdditionalArguments" `
                                -WindowStyle Hidden `
								-WaitForMsiExec `
								-ErrorAction SilentlyContinue
                                
                Write-ADTLogEntry -Message "Deinstallation gestartet für: $($App.DisplayName)" -Severity 1
            }
            else {
                Write-ADTLogEntry -Message "Kein ProductCode gefunden für: $($App.DisplayName). Überspringe." -Severity 3
            }
        }
    }
    catch {
        Write-ADTLogEntry -Message "Fehler bei der MSI-Deinstallation: $_" -Severity 3
        throw
    }
}

```

Invoke-AppDeployToolkit.ps1  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/psappdeploytoolkit/original/2X/2/2f0b625cba2b7c10486ac69dff4c433590dd99b8.png)

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/psappdeploytoolkit/original/2X/4/41b55e0763acec34ff32fecabc299fa1b50a6be4.png)

cu  
bolle

---

<div class="post-metadata">

**Author:** ![JimO](https://avatars.discourse-cdn.com/v4/letter/j/858c86/32.png) [@JimO](https://discourse.psappdeploytoolkit.com/u/JimO)\
**Post date:** [February 17, 2026, 3:15pm UTC](https://discourse.psappdeploytoolkit.com/t/remove-msiapplications-for-psadt-4/7329/2 "2026-02-17T15:15:35Z")

</div>

Why not just use [Uninstall-ADTApplication](https://psappdeploytoolkit.com/docs/reference/functions/Uninstall-ADTApplication)?

Something like this should work:  
Uninstall-ADTApplication -name 'Zoom Workplace (64-bit)' -ApplicationType MSI

---

<div class="post-metadata">

**Author:** ![bolle01](https://avatars.discourse-cdn.com/v4/letter/b/41988e/32.png) [@bolle01](https://discourse.psappdeploytoolkit.com/u/bolle01)\
**Post date:** [February 17, 2026, 3:54pm UTC](https://discourse.psappdeploytoolkit.com/t/remove-msiapplications-for-psadt-4/7329/3 "2026-02-17T15:54:05Z")

</div>

Thank you, that works perfectly, thank you.

cu

bolle

---

<div class="post-metadata">

**Author:** ![mjr4077au](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.psappdeploytoolkit.com/mjr4077au/32/1976_2.png) [@mjr4077au](https://discourse.psappdeploytoolkit.com/u/mjr4077au)\
**Post date:** [February 18, 2026, 7:15am UTC](https://discourse.psappdeploytoolkit.com/t/remove-msiapplications-for-psadt-4/7329/4 "2026-02-18T07:15:58Z")

</div>

We'd have to be crazy to remove such functionality out of the base product. Judging by some of your posts, I feel like you're just jumping in without reading any documentation, such as [v4 Function Mapping · PSAppDeployToolkit](https://psappdeploytoolkit.com/docs/4.1.x/reference/v4-function-mapping).

I'd strongly recommend starting with that above link so you're not wasting your time writing code like the above for things the product already offers to you.
