First of all, you have to check for the silent uninstall command.

For this purpose I usually use this tool: https://www.nirsoft.net/utils/uninstall_view.html

UninstallView is a tool for Windows that collects information about all programs installed on your system and displays the details of the installed programs in one table. You can use it to get installed programs information for your local system, for remote computer on your network, and for external hard-drive plugged to your computer. It also allows you to easily uninstall a software on your local computer and remote computer (Including quiet uninstall if the installer supports it).

The tool displays the silent uninstall command.

If you find the command, try it out manually. Sometimes, even a command is provided, silent uninstall doesn't work as expected.

Second, my recommendation is not to use WMI for uninstall, cause it is slow in determine the installed programs. Instead check for the registry key, which is also displayed by the tool.

To be more generic, read in these keys

HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

search for DisplayName with a where statement and execute the command in the quietuninstall key.

Answer from Hans Hubert Vogts on Stack Exchange
Top answer
1 of 2
1

First of all, you have to check for the silent uninstall command.

For this purpose I usually use this tool: https://www.nirsoft.net/utils/uninstall_view.html

UninstallView is a tool for Windows that collects information about all programs installed on your system and displays the details of the installed programs in one table. You can use it to get installed programs information for your local system, for remote computer on your network, and for external hard-drive plugged to your computer. It also allows you to easily uninstall a software on your local computer and remote computer (Including quiet uninstall if the installer supports it).

The tool displays the silent uninstall command.

If you find the command, try it out manually. Sometimes, even a command is provided, silent uninstall doesn't work as expected.

Second, my recommendation is not to use WMI for uninstall, cause it is slow in determine the installed programs. Instead check for the registry key, which is also displayed by the tool.

To be more generic, read in these keys

HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

search for DisplayName with a where statement and execute the command in the quietuninstall key.

2 of 2
1

Uninstall an application silently

To uninstall an application, you can run the uninstall process as a startup script so it does not require any end-user input or interaction to complete the uninstall operation.

Since you are using PowerShell and already have logic you confirm uninstalls the application you need, the example provided will build off of that to keep it simple and basic.

Furthermore, beneath that I will provide an additional but different (and more efficient) way to uninstall the package using PowerShell since you are using Windows 10.

  1. PowerShell Script (existing logic)

    Note: Save this to C:\Scripts\Test.ps1 or on the local machine or perhaps a UNC path that you've granted Domain Computers and/or Authenticated Users to the folder and the share.

    $app = Get-WmiObject -Class Win32_Product | ?{$_.name -eq "HP Support Assistant"};
    $app.Uninstall();
    
  2. PowerShell Script (more effecient logic)

    Note: This uses Get-Package with the package name and pipes that over to Uninstall-Package to uninstall the application from Windows.

    $pName = "HP Support Assistant";
    Get-Package $pName | Uninstall-Package;
    

Run as a startup script using Group Policy settings

Note: Use gpedit.msc on the local machine to run the script as a Startup Script or if you are able use Group Policies from Active Directory if applicable in a domain environment.

  1. Go to gpedit.msc
  2. Navigate Computer Configurations | Windows Settings | Scripts (Startup/Shutdown)
  3. Click on Startup | PowerShell Scripts tab | Add option
  4. Point the Script Name field to the full path of the startup script location
  5. Press OK and/or Apply out of all existing screens to save the settings

  6. Lastly, you will just want to restart the computer to ensure the startup script runs and uninstalls the application without any need for user interaction or input.


Other Potential Solution

According to an answer on the HP Silent Uninstall HP Support Assistant post, you can also uninstall the HP Support Assistant application while logged on and not as a login script silently using:

"C:\Program Files (x86)\Hewlett-Packard\HP Support Framework\UninstallHPSA.exe" /s /v /qn


Supporting Resources

  • Get-Package
  • Uninstall-Package
Discussions

windows - How can I uninstall an application using PowerShell? - Stack Overflow
Is there a simple way to hook into the standard 'Add or Remove Programs' functionality using PowerShell to uninstall an existing application? Or to check if the application is installed? More on stackoverflow.com
🌐 stackoverflow.com
Need PowerShell working script to uninstall software from Control Panel,Registry
Hi Experts, I have to uninstall Microsoft Visual C++ 2019 X64 Additional Runtime - 14.29.30133 & Microsoft Visual C++ 2019 X86 Additional Runtime - 14.29.30133 software from my Control panel and Registry. I have tried from the below powershell code, I am not getting any error. More on community.spiceworks.com
🌐 community.spiceworks.com
24
12
March 3, 2023
Software Uninstaller Script (Silent)
Some tips when sharing: Don't use positional parameters, I added -Object here A personal one, but try to keep using capital letters at the start of cmds/parameters You also don't need the "" when using a variable on it's own Write-Host -ForegroundColor Magenta -Object $MsgIntro Don't use aliases Select-Object -Property Displayname, InstallLocation, UninstallString Sort-Object Try to keep it PowerShell cmd /c $uninstall /quiet /norestart Consider using Start-Process instead. If you're not already aware. PSScriptAnalyzer is a great tool to scan your scrips to highlight common mistakes. More on reddit.com
🌐 r/PowerShell
17
32
January 24, 2018
uninstallation - Uninstall Chrome silently using Powershell - Stack Overflow
I have the following PowerShell script, which I am using to get the uninstall string for Google Chrome, and then I want to uninstall it silently. Line 3 in the script will pop up the GUI uninstalle... More on stackoverflow.com
🌐 stackoverflow.com
🌐
Reddit
reddit.com › r/powershell › is it possible to silent/force uninstall when application does not have a quietuninstallstring?
r/PowerShell on Reddit: Is it possible to silent/force uninstall when application does not have a QuietUninstallString?
February 24, 2023 -

I would like to uninstall an application using registry paths as this is what I can view in Defender for users devices.

When using the following command it works but a prompt is still coming up. I have tried adding different switches but not getting any where. Is this even possible if the app does not have a QuietUninstallString listed?

$paths = 'REGISTRY::HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{6FB7DAEC-5DAD-491E-9951-4684423F291C}'
$app = Get-ItemProperty $paths | Select-Object UninstallString
$app.UninstallString | cmd

Thank you

🌐
Microsoft Learn
learn.microsoft.com › en-us › powershell › module › packagemanagement › uninstall-package
Uninstall-Package (PackageManagement) - PowerShell | Microsoft Learn
Each module has commands that are not available in the other. Commands with the same name differ in their specific arguments. For more information, see the PowerShell reference documentation for the Package Manager Console of Visual Studio. The Uninstall-Package cmdlet uninstalls packages.
🌐
Windows OS Hub
woshub.com › uninstall-apps-with-powershell-windows
Uninstalling Apps Using PowerShell or CMD on Windows 11 and 10 | Windows OS Hub
2 weeks ago - Note that some apps include a command in the QuietUninstallString value that can be used to remove the program silently (without displaying any notifications or confirmations). The commands and PowerShell scripts described in this article can ...
🌐
GitHub
github.com › mightyteegar › SilentUninstall
GitHub - mightyteegar/SilentUninstall: Powershell script to attempt to silently uninstall programs on a Windows machine. · GitHub
Provide the -u flag to SIMULATE uninstalling all found programs. To actually perform an uninstall, add the -nosim flag. WARNING: Use with caution -- there is NO confirmation! SilentUninstall.ps1 cisco -u -- SIMULATES uninstalling EVERY program ...
Author   mightyteegar
Find elsewhere
Top answer
1 of 15
184
$app = Get-WmiObject -Class Win32_Product | Where-Object { 
    $_.Name -match "Software Name" 
}

$app.Uninstall()

Edit: Rob found another way to do it with the Filter parameter:

$app = Get-WmiObject -Class Win32_Product `
                     -Filter "Name = 'Software Name'"
2 of 15
65

EDIT: Over the years this answer has gotten quite a few upvotes. I would like to add some comments. I have not used PowerShell since, but I remember observing some issues:

  1. If there are more matches than 1 for the below script, it does not work and you must append the PowerShell filter that limits results to 1. I believe it's -First 1 but I'm not sure. Feel free to edit.
  2. If the application is not installed by MSI it does not work. The reason it was written as below is because it modifies the MSI to uninstall without intervention, which is not always the default case when using the native uninstall string.

Using the WMI object takes forever. This is very fast if you just know the name of the program you want to uninstall.

$uninstall32 = gci "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall" | foreach { gp $_.PSPath } | ? { $_ -match "SOFTWARE NAME" } | select UninstallString
$uninstall64 = gci "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" | foreach { gp $_.PSPath } | ? { $_ -match "SOFTWARE NAME" } | select UninstallString

if ($uninstall64) {
$uninstall64 = $uninstall64.UninstallString -Replace "msiexec.exe","" -Replace "/I","" -Replace "/X",""
$uninstall64 = $uninstall64.Trim()
Write "Uninstalling..."
start-process "msiexec.exe" -arg "/X $uninstall64 /qb" -Wait}
if ($uninstall32) {
$uninstall32 = $uninstall32.UninstallString -Replace "msiexec.exe","" -Replace "/I","" -Replace "/X",""
$uninstall32 = $uninstall32.Trim()
Write "Uninstalling..."
start-process "msiexec.exe" -arg "/X $uninstall32 /qb" -Wait}
🌐
Redmondmag.com
redmondmag.com › articles › 2019 › 08 › 27 › powershell-to-uninstall-an-application.aspx
How To Use PowerShell To Uninstall an Application -- Redmondmag.com
August 27, 2019 - Now you can uninstall the application by calling the Uninstall method. Here is the command: ... The technique that I just showed you is the generally accepted way of removing applications from a Windows desktop using PowerShell.
🌐
TechLabs
techlabs.blog › categories › office-365 › uninstall-an-application-using-powershell-and-endpoint-manager
Uninstall an Application using PowerShell and Endpoint Manager - TechLabs
October 3, 2022 - This example is for uninstalling ... 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 ...
🌐
4sysops
4sysops.com › home › blog › articles › uninstall programs (remotely) with powershell
Uninstall programs (remotely) with PowerShell – 4sysops
July 28, 2023 - Uninstalling the program remotely via WMI and PowerShell ... In general, this method works quite reliably and uninstalls applications remotely.
🌐
Reddit
reddit.com › r/powershell › software uninstaller script (silent)
r/PowerShell on Reddit: Software Uninstaller Script (Silent)
January 24, 2018 -

Hey guys

here's the full script for who wants it, it is a simple script to uninstall multiple applications at once if you want. (Select multiple applications in the out-gridview and press "ok")

Be very careful using this script! Use it at your own risk and if you know what you are doing.

Any positive/negative criticism is always welcome in order for me to improve my skills.

Thank you!

    $MsgIntro = @' 

    ***********************                               ***********************
                              Software Uninstaller Tool    Made by PRIDEVisions
    ***********************                               ***********************

    '@

    write-host -ForegroundColor Magenta "$MsgIntro"
    Write-host -ForegroundColor Magenta "Please select the software you wish to uninstall..."

    Get-ItemProperty HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\* | select Displayname, InstallLocation, UninstallString | sort | Out-GridView -PassThru -OutVariable software

    write-host -ForegroundColor Yellow "The following software will be uninstalled:"

    foreach ($application in $software) {
        write-host "$Application"
        $uninstall = $Application.UnInstallString
        cmd /c $uninstall /quiet /norestart
        }

Original question regarding this script: https://www.reddit.com/r/PowerShell/comments/7sdc0u/readhost_interrupting_script/

Edit: Quickly adjusted the script for both 32-bit & 64-bit software versions (It's not fully changed as i would like to but now it works better).

    $MsgIntro = @' 

    ***********************                               ***********************
                              Software Uninstaller Tool       Made by PRIdEVisions
    ***********************                               ***********************

    '@

    write-host -ForegroundColor Magenta "$MsgIntro"
    Write-host -ForegroundColor Magenta "Please select the software you wish to uninstall..."


    $Software = Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*", "HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*" | select DisplayName, UninstallString, InstallLocation, InstallDate | out-gridview -PassThru



    write-host -ForegroundColor Yellow "The following software will be uninstalled:"

    foreach ($application in $Software) {

        if ($application.UninstallString -like "MsiExec*") {
        write-host "$Application"
        $uninstall = $Application.UnInstallString
        cmd /c $uninstall /quiet /norestart
        }
        else {
            $uninstall = $Application.UnInstallString
            & "$uninstall"
    
        }
        }
🌐
NinjaOne
ninjaone.com › home › script hub › how to automate application uninstallation on windows using powershell
How to Automate Application Uninstallation on Windows Using PowerShell - NinjaOne
October 13, 2025 - Instead, the administrator could deploy this PowerShell script across all machines, specifying “VLC Media Player” as the application name. The script would automatically find the appropriate uninstall string, execute the uninstallation silently, and even schedule a reboot if necessary.
🌐
TechGenix
techgenix.com › how-to-uninstall-software-using-powershell
How to Uninstall Software Using PowerShell
July 2, 2022 - Manage network and application performance · Prevent downtime & simplify network management
🌐
Action1
action1.com › home › blog › how to uninstall software using powershell in windows 10
How to Uninstall Software Using PowerShell in Windows 10
September 19, 2025 - 3. Find the full name of the desired component from this list and enter Get-AppxPackage APPLICATION_NAME | Remove-AppxPackage –package (the application name must be taken from the PackageFullName list) to remove it.
🌐
YouTube
youtube.com › watch
Mastering PowerShell: Uninstalling Software Made Easy - YouTube
In this video, we'll show you how to use PowerShell to quickly and easily uninstall the software from your Windows computer. Specifically, we'll walk you thr...
Published   April 23, 2023
🌐
PDQ
pdq.com › blog › silently-uninstall-just-about-anything
How to silently uninstall just about anything | PDQ
1 week ago - When the deployment finishes, scan your devices, then confirm that the application has been uninstalled. PDQ Inventory lets you silently uninstall applications by running stored uninstall strings directly from the console.
🌐
Microsoft Learn
learn.microsoft.com › en-us › answers › questions › 749780 › massively-uninstall-applications-with-powershell
Massively uninstall applications with PowerShell - Microsoft Q&A
# Note: This will will closed the SCCM thread and open a new thread. if ($PSHome -match 'syswow') { Log-write $log 'Found syswow' Log-write $log 'Shell to x64 version' start-process "C:\Windows\sysnative\WindowsPowerShell\v1.0\powershell.exe" -arg "-ExecutionPolicy bypass -file $e" -Wait Log-write $log 'Return from x64 version; exiting' exit } $result = Get-InstalledApps | where {$_.DisplayName -like $appToMatch} $result Log-write $log 'Found these isntalled apps:' ForEach ($u in $result) { $UnInstall = $u.UninstallString $UnInstall = $UnInstall.Trim() If ($UnInstall -contains '.msi'){ Log-wri