Inventorying the installed software
In addition to inventorying a system's hardware, it is often necessary to inventory the installed software. There are two primary methods to query the installed software: using the Microsoft Installer
, and the Uninstall
registry key. These two locations generally return the same information, however as we will see there are different uses for each.
How to do it...
Complete the following to review the installed software:
Get installed features.
Get-WindowsFeature | Where-Object Install`State -EQ "Installed"
Return software inventory via MSI.
Get-WmiObject -Class Win32_Product
Open event viewer and review the system event logs. Note the multiple
Event ID 1035
messages as shown in the following screenshot:Return inventory via a registry.
$HKLM = 2147483650 (([wmiclass]"root\default:stdregprov").EnumKey($HKLM, ` "Software\Microsoft\Windows\CurrentVersion\Uninstall")).sNames
Return installed patches.
Get-WmiObject -Class Win32_QuickFixEngineering
How it works...
We...