
To list the installed programs, use the Get-Package cmdlet. In this case, you can switch to package management, which only works locally.

Tools like 7-zip don't appear at all, and others appear only with a GUID, so you don't know what the entry stands for. The comparison of Win32_Product and Get Package shows that WMI does not list all programs In our example, this call captures an outdated version of PowerShell 7 and assigns the result to the $app variable. To get it, you have to use the older Get-WMIObject instead: $app = Get-WmiObject -Class Win32_Product -ComputerName | If you send the output of this command through a pipe to Get-Member, you will not find an uninstall method. Once you have viewed the program in question, you can further narrow the list: Get-CimInstance -Class Win32_Product -ComputerName | With its help, you can first view the installed software: Get-CimInstance -Class Win32_Product -ComputerName | The class Win32_Product is responsible for this. This is the only mechanism mentioned here that can perform this task remotely. In addition, separate cmdlets exist for Store and UWP apps with Remove-AppxProvisionedPackage and Remove-AppxPackage.įinally, it is possible to uninstall applications using WMI. However, it still does not have a PowerShell interface, and thus is limited in its options when automating package management. A year later, it offered the ability to remove programs.

Then, in 2020, the package manager winget was added. However, it is also suitable for uninstalling Win32 programs. A few years ago, Microsoft introduced PowerShell Package Management, which is primarily for adding and removing PowerShell modules. The command line tools for uninstalling programs are similarly inconsistent. CLI options for uninstalling applications
