Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

How to get the currently installed programs list as the same as appwiz.cpl shows?

$
0
0

Under path "Control Panel\Programs\Programs and Features", here is a list to show the currently installed programs, now I want to get the list with powershell, I tried below two commands, but they returned a different result counts, neither much or less than the expect one. anyone knows how to do with it?

Note: The counts is 144 (the expected number) when checked with appwiz.cpl

PS C:\Users\testuser> $a = Get-WmiObject -Class win32_product | Select-Object Name

PS C:\Users\testuser> $a.count
275

PS C:\Users\testuser> $b = Get-ItemProperty 'hklm:\software\microsoft\windows\currentversion\uninstall\*' | Where-Object {$_.DisplayName}

PS C:\Users\testuser> $b.Count
113

 


Viewing all articles
Browse latest Browse all 6937

Trending Articles