Windows OS Hub
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server 2025
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
    • Proxmox
  • PowerShell
  • Linux
  • Home
  • About

Windows OS Hub

  • Windows
    • Windows 11
    • Windows 10
    • Windows Server 2025
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
    • Proxmox
  • PowerShell
  • Linux

 Windows OS Hub / PowerShell / Uninstalling Apps Using PowerShell or CMD on Windows 11 and 10

March 26, 2026

Uninstalling Apps Using PowerShell or CMD on Windows 11 and 10

Windows provides several command-line tools for uninstalling software from user computers. You must select the appropriate tool based on the Windows version, the application type (MSI, classic Win32, or Microsoft Store app), and the installation scope, whether the program is deployed per-machine (for all users) or per-user (for the current user). In this article, we will explore various methods for removing programs installed in Windows from the command prompt or PowerShell console, including both interactive and silent uninstallation techniques.

Contents:
  • How to Uninstall a Program Using PowerShell in Windows 11 or 10
  • Uninstalling Microsoft Store (UWP) Apps Using PowerShell
  • How to Uninstall a Software Using the WinGet Command
  • Using WMI to Uninstall Apps in Windows
  • Get the Program Uninstall String from the Registry

How to Uninstall a Program Using PowerShell in Windows 11 or 10

In Windows 11 and 10, as well as in Windows Server 2025, 2022, 2019, and 2016, you can use cmdlets from the built-in PowerShell PackageManagement module to install and uninstall software. This is the simplest and most universal way to uninstall programs in modern versions of Windows. It’s worth trying first. It allows you to uninstall programs installed through the Windows Installer service (MSI packages), as well as traditional Win32 applications and MSU-based Windows updates.

To list the installed program packages on your computer, run the command:

Get-Package

Get-Package - Powershell: Export List of apps

The command returns a list of programs installed through the different providers (ProviderName). You can display a list of providers on a computer as follows:

Get-PackageProvider

  • Programs
  • Msi
  • Msu
  • PowerShellGet
  • NuGet

list package proveders in windows 10

To list programs installed via a specific package provider, run this command:

Get-Package -ProviderName Programs -IncludeWindowsInstaller

Use a pipeline with the Uninstall-Package cmdlet to remove a program (note that I use the wildcard character * to avoid typing out the entire program name):

Get-Package -Name "Notepad++*" | Uninstall-Package

You can remove the installed PowerShell module. For example, to uninstall all VMware.PowerCLI modules:

Get-Package -ProviderName PowerShellGet -Name "VMware.*" | Uninstall-Package

To uninstall a program on a remote computer, use the Invoke-Command cmdlet:

Invoke-Command -ComputerName mun-dc01 -ScriptBlock { Get-Package -Name "Notepad++*" | Uninstall-Package}

WinRM PowerShell remoting must be enabled on the remote computer. You can either manually enable PowerShell Remoting in Windows or deploy a GPO with a WinRM configuration.

Uninstalling Microsoft Store (UWP) Apps Using PowerShell

Use the PowerShell cmdlets Remove-AppxPackage and Remove-AppxProvisionedPackage to uninstall Microsoft Store (UWP) applications in Windows.

List the Microsoft Store apps that are installed for the current user:

Get-AppxPackage | select Name,NonRemovable,PackageUserInformation,PackageFullName

Get-AppxPackage - list Microsoft Store apps

Remove the application only for the current user:

Get-AppxPackage *BingWeather* | Remove-AppPackage -verbose

Remove the app for all users:

Get-AppxPackage *BingWeather* -AllUsers| Remove-AppPackage –AllUsers  -verbose

Learn more about removing pre-installed Microsoft Store apps in Windows.

How to Uninstall a Software Using the WinGet Command

You can use the new WinGet package manager (it is built into Windows 10 and 11) to install and remove programs on Windows. To get a list of installed programs on your computer, run:

winget list

The command returns a list of programs, including those installed without WinGet, as well as a list of Microsoft Store apps.

winget list installed apps

To remove an app installed via WinGet, specify its name:

winget uninstall --name 7zip.7zip

To uninstall an MSI app in Windows, specify its GUID:

winget uninstall --id "{332C1E78-1D2F-4A64-B718-68095DC6254B}"

To uninstall a Microsoft Store app, specify its PackageFullName.

winget uninstall --id "Microsoft.ZuneVideo_8wekyb3d8bbwe"

winget uninstall application from cmd

However, winget doesn’t natively allow you to uninstall programs on a remote computer. To execute the winget command on a remote computer, use the PowerShell Remoting features (Invoke-Command and Enter-PSSession cmdlets). For example:

Invoke-Command -ComputerName wkmn-man231 -ScriptBlock {winget uninstall --name 7zip.7zip}

Using WMI to Uninstall Apps in Windows

In previous versions of Windows, program uninstallation was commonly performed using commands that invoked the uninstall process through the WMI ( Windows Management Instrumentation) namespace API. I strongly advise against using these methods in modern versions of Windows, and I will explain why below.

For example, you can use the wmic command to query the WMI namespace and retrieve a list of installed programs:

wmic product get name,version

wmic product get name,version - get list of installted appd

To uninstall a program silently, copy its full name from the list and run the following command:

wmic product where name="VMware vCenter Converter Standalone" call uninstall /nointeractive

The command invokes the WMI method, which uses Windows Installer to remove the program:

Executing (\\COMPName\ROOT\CIMV2:Win32_Product.IdentifyingNumber="{PROGRAM_GUID}",Name="VMware vCenter Converter Standalone",Version="6.2.0.8466193")->Uninstall()

If the program is successfully uninstalled, it will return:

Method execution successful. Out Parameters: instance of __PARAMETERS {
ReturnValue = 0; };

In PowerShell, the equivalent of the wmic command for accessing the WMI namespace is the Get-WmiObject cmdlet. The similar PowerShell commands for listing and uninstalling programs via WMI are shown below:

Get-WmiObject Win32_Product | ft name,version,vendor,packagename
(Get-WmiObject Win32_Product -Filter "Name = 'XXX'").Uninstall()

In order to remove a program on a remote computer, add the -ComputerName option. For example, to uninstall Microsoft Office on a remote computer, run the command below:

$apps = Get-WmiObject -Class Win32_Product -ComputerName wkmn-man23 |where name -Like "Office 16 Click-to-Run*"
$apps.uninstall()

The Get-WmiObject command is not supported in newer versions of PowerShell Core. Instead, use the Get-CimInstance cmdlet. List the installed software:

Get-CimInstance Win32_Product | ft name,version,vendor,packagename

Uninstall the program:

$MyApp = CimInstance -Class Win32_Product | Where-Object{$_.Name -eq "PowerToys"}
$MyApp.Uninstall()

Uninstall Windows app via WMI

Here’s why you should avoid using commands to uninstall software via the WMI API:

  • This method only allows you to remove programs that were installed via the MSI Installer service (classic MSI packages).
  • This cannot be used to uninstall Microsoft Store apps or PowerShell modules.
  • The MSIInstaller service initiates a consistency check for each program when listing installed programs via the Win32_Product WMI class. This could potentially lead to changes to the current configuration of MSI apps. You can confirm it by the events with Event ID 1035 from MsiInstaller in the Application log:Windows Installer reconfigured the product. Product Name: Zoom Workplace (64-bit). Product Version: 6.5.1234. Product Language: 1033. Manufacturer: Zoom. Reconfiguration success or error status: 0.msiinstaler event id 1035: Windows Installer reconfigured product
  • The processing of commands via WMI is extremely slow.
  • The wmic command is not installed by default in the latest Windows 11 builds.

Get the Program Uninstall String from the Registry

As mentioned earlier, not all programs use the Windows Installer (MSI) for installation. However, regardless of the installation method, correctly designed programs are always registered in the registry during installation. They store information about the program and the specific command required to remove the software in the registry.

Information about programs installed for all users of the computer (per-machine) is stored under these registry keys:

  • HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
  • HKLM\SOFTWARE\Wow6432node\Microsoft\Windows\CurrentVersion\Uninstall

The user registry hive stores programs that are installed only in the current user profile (%userprofile%\AppData):

  • HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
  • HKCU\SOFTWARE\Wow6432node\Microsoft\Windows\CurrentVersion\Uninstall

For example, I located the 7-Zip tool registry hive and found the appropriate command for its removal in the UninstallString parameter value.

Get program uninstall string from registry

Since this program was installed via WMI, the msiexec command is used to remove it. So, to uninstall the app, run the following command:

msiexec /x the_application_GUID

msiexec: get program uninstall command

The following PowerShell script queries the specified registry keys and displays the program names along with their removal commands:

$Installed = Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*
$Installed += Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*
$Installed += Get-ItemProperty HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*
$Installed += Get-ItemProperty HKCU:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*

In this case, I want to list the programs that were not installed via MSIEXEC:

$Installed| where UninstallString -notlike "*msiex*"|Select-Object -Property DisplayName, QuietUninstallString, UninstallString|fl

Extract program QuiteUninstallString from the registry

To uninstall a program, copy the command from the UninstallString value and paste it into the command prompt to execute it. 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 be used to remove programs locally or remotely and automate software updates or removals on user computers via SCCM or GPO logon scripts.

1 comment
5
Facebook Twitter Google + Pinterest
PowerShellWindows 10Windows 11Windows Server 2022
previous post
Configuring Remote Desktop Services (RDS) Farm on Windows Server
next post
How to Send a Message to Teams Channel with PowerShell

Related Reading

How to Install RSAT (Remote Server Administration Tools)...

March 24, 2026

Wi-Fi (Internet) Disconnects After Sleep or Hibernation on...

March 15, 2024

Fix: Remote Desktop Licensing Mode is not Configured

August 24, 2023

Managing Windows Firewall Rules with PowerShell

March 11, 2024

How to Find the Source of Account Lockouts...

March 12, 2024

How to Delete Old User Profiles in Windows

March 15, 2024

Install and Manage Windows Updates with PowerShell (PSWindowsUpdate)

March 17, 2024

Adding Drivers into VMWare ESXi Installation Image

March 13, 2024

1 comment

hysi September 23, 2024 - 2:02 pm

awsome,but still i got some problem when i try uninstall some application on my pc.when i try to use
Get-Package -Name “**” | Uninstall-Package,it stuck there for like ten more mins.took that so much time then i shut it down.

Reply

Leave a Comment Cancel Reply

join us telegram channel https://t.me/woshub
Join WindowsHub Telegram channel to get the latest updates!

Recent Posts

  • Mounting NFS Shares in Windows Using the Built-in Client

    March 26, 2026
  • Monitor Windows Log Files in Real Time with PowerShell

    March 17, 2026
  • Pin and Unpin Apps to Taskbar in Windows 11 via PowerShell

    March 10, 2026
  • Load and Initialize Network Drivers in Windows PE or Recovery Environment

    February 25, 2026
  • How to Set a Custom Drive Icon in Windows

    February 17, 2026
  • Managing Per-User Services in Windows

    February 11, 2026
  • Change Default OU for New Computers and Users in AD

    February 2, 2026
  • Where Windows Stores Certificates and Private Keys

    January 22, 2026
  • How to Extract Printer Drivers from Windows

    January 21, 2026
  • How to Remove Old (Unused) PowerShell Modules

    January 12, 2026

Follow us

  • Facebook
  • Twitter
  • Youtube
  • Telegram
Popular Posts
  • Install and Manage Windows Updates with PowerShell (PSWindowsUpdate)
  • How to Download Offline Installer (APPX/MSIX) for Microsoft Store App
  • How to Update Trusted Root Certificates in Windows: Manual and Automatic Methods Explained
  • Fix: Remote Desktop Licensing Mode is not Configured
  • How to Delete Old User Profiles in Windows
  • Configuring Port Forwarding in Windows
  • How to Install RSAT (Remote Server Administration Tools) on Windows
Footer Logo

@2014 - 2026 - Windows OS Hub. All about operating systems for sysadmins


Back To Top