Here we go.

Get-WmiObject Win32_Product -computername ComputerName | ft Name

A small script to do this on multiple servers:

$strComputers = Get-Content Serverlist.txt
$Output = “AppList.txt”
Set-Content $Output “”
Foreach ($computer in $strComputers)
{
$cname=Get-WmiObject Win32_Product -computername $Computer
write-host $computer
foreach($C in $cname)
{
[string]$Content = $C.Name
$Content2 = $computer + “,” + $Content
write-host $Content2
add-content $Output $Content2
}
}

Another way of doing this is by reading the ‘Uninstall’ Registry key. This site gives the command.

Dir HKLM:\software\microsoft\windows\currentversion\uninstall |   ForEach-Object { Write-Host -ForegroundColor Yellow “Installed Products:” }{    $values = Get-ItemProperty $_.PSPath;     “{0:-30} {1:20}” -f $values.DisplayName, $values.MoreInfoURL  }{Write-Host -ForegroundColor Yellow “Finished!”}

-Thanks, Jinesh.

Advertisements