Scripts (PowerShell)

How to get a list of installed applications using PowerShell in Windows

PowerShell is a task-based command-line shell and scripting language built on .NET. By using PowerShell, system administrators can automate tasks and processes using the command line. Powershell script will be very useful for listing the installed applications. In this article, I will be demonstrating how to use Powershell script samples such as “Get-WmiObject -Class Win32_Product” to get installed products in Local and Remote machines. Kindly visit the following hyperlinks for more information. How to uninstall built-in apps using PowerShell in Windows 10, how to uninstall a program via Command Prompt (CMD) in Windows. See this guide on how to check if Windows Updates were Installed on your Computer using was, program and features, DISM and WMIC, etc, and how to find the AUMID of an installed UWP App.

We have created a new article for this topic "How to get the list of installed programs locally and on a remote computer in Windows".

Note: Starting in PowerShell 3.0, the Get-WmiObject cmdlet has been superseded by Get-CimInstance. The Get-WmiObject cmdlet gets instances of WMI classes or information about the available WMI classes. Th CimCmdlets modules contain cmdlets that interact with Common Information Model (CIM) Servers like the Windows Management Instrumentation (WMI) service. If you run into errors while running the CimInstance Cmdlets, please see “WinRM cannot complete the operation, verify that the specified computer name is valid, that the computer is accessible over the network, and that a firewall exception for the WinRM service is enabled

Part A: List Installed Software using PowerShell on your PC:

You can list the installed software programs using Powershell’s WMI Class Win32_Product. Also see how to remove Windows 10 Apps with DISM: How to remove pre-provisioned apps from Windows Image and how to determine Apps UWP and remove pre-provisioned appx in Windows 10.

Here, FT is nothing but the Format-Table cmdlet, you can change it into FL to display the result in the list view. We will be using the command “Get-WMIObject -Class Win32_Product” to find installed programs.

Get-WMIObject -Query "SELECT * FROM Win32_Product" | FT

2: List Installed Software using Powershell on Remote Computer

You can list the installed software programs from Remote Machine by giving the name of the remote computer through argument syntax -ComputerName.

Get-WMIObject -ComputerName "your-pc" -Query "SELECT * FROM Win32_Product" | FL

3: Get a List of Installed Programs using Powershell with Filter

You can use SQL Query-like syntax in the Win32_Product class. The following Powershell script, filter and list only Non-Microsoft software.

Get-WMIObject -Query "SELECT * FROM Win32_Product Where Not Vendor Like '%Microsoft%'" |FT

4: Filter, and list only Microsoft-based software

Use the following PowerShell script, filter, and list only Microsoft-based software.

Get-WMIObject -Query "SELECT * FROM Win32_Product Where Vendor Like '%Microsoft%'" | FT

I hope you found this blog post helpful. If you have any questions, please let me know in the comment session.

Subscribe
Notify of
guest

8 Comments
Inline Feedbacks
View all comments
Shadetree Sam
Shadetree Sam
7 months ago

Hi,
Thanks for the clear, nicely written directions. I’m running Windows 10 Pro 64-bit v21H2, PowerShell v5.1, and for some reason I’m not getting a full list of installed apps and programs. (I’m using the Start Menu in “C:\ProgramData\Microsoft\Windows\Start Menu\Programs” as a reference.)

Any idea why this might be?

Thanks.

Raymond
Raymond
4 months ago
Reply to  Shadetree Sam

It has been reported sadly that the Get-WmiObject command is depreciated and is no longer able to function. You may have to test with the Get-Cim… type commands.

Patrick
Patrick
12 days ago
Reply to  Christian

Hi,

I am trying to use the code for getting a software list from a remote computer. I am new to PowerShell so I do not know what Get-Cim command is suitable to replace the Get-WmiObject command.

Any help is much apricated.

Christian
Christian
8 days ago
Reply to  Patrick

Hello Patrick,

There are multiple ways to achieve this. Since you wish to achieve this with the Get-CimInstance cmdlet,  please try this command below:  

Get-CimInstance -Class Win32_Product -Computer <remotecomputername>

Patrick
Patrick
6 days ago
Reply to  Christian

Hi Christian,

I am getting an error when I run the command you provided. You mentioned other ways of doing this, could you show some of these other ways.

8
0
Would love your thoughts, please comment.x
()
x