Summary:
- List Installed Software in Local Machine
- List Installed Software in Remote Computer
- Get List of Installed Products with Filter
- Export Installed Product List into CSV file
List Installed Software using Powershell in Local Machine
You can list the installed software programs using Powershell’s WMI Class Win32_Product. Here, FT is nothing but the Format-Table cmdlet, you can change it into FL to display result in list view.
Get-WMIObject -Query "SELECT * FROM Win32_Product" | FT
You can also use this command: Get-WMIObject -Class Win32_Product to find installed programs.
List Installed Software using Powershell in Remote Computer
You can list the installed software programs from Remote Machine by giving name of remote computer through argument syntax -ComputerName.
Get-WMIObject -ComputerName "your-pc" -Query "SELECT * FROM Win32_Product" | FL
Get List of Installed Programs using Powershell with Filter
You can use SQL Query like syntax in Win32_Product class. The following Powershell script, filter and list only Non-Microsoft softwares.
Get-WMIObject -Query "SELECT * FROM Win32_Product Where Not Vendor Like '%Microsoft%'" |FT
Use following powershell script, filter and list only Microsoft based softwares.
Get-WMIObject -Query "SELECT * FROM Win32_Product Where Vendor Like '%Microsoft%'" | FT
Export Installed Product List into CSV file using Powershell
You can export the installed software application details to CSV using Powershell’s Export-CSV cmdlet. The following script exports the Non-Microsoft based products to CSV file from Remote Computer.
Get-WMIObject -ComputerName "hp-pc"` -Query "SELECT * FROM Win32_Product Where Not Vendor Like '%Microsoft%'" | Select-Object Name,Version,Vendor,InstallLocation,InstallDate | Export-CSV 'C:\Non_MS_Products.csv'
Thanks,
Morgan
Software Developer
Do not use Win32_Product to check for installed software, there is a bug that can cause all software to run a repair. M$ have known about it since windows 2008 and not fixed it.
Thank you. That’s the first thing I thought when I saw the command. To get a list of installed program faster and w/o causing other issues I use the below string.
Get-ciminstance Win32reg_AddRemovePrograms