Returns a list of software that was installed on a computer
Using Windows Installer. This information is then
Written to a text file. This script requires both Windows
PowerShell and the corresponding version
The. NET Framework. For more information on downloading
These items see the Windows PowerShell download page (right ).
Copy codeThe Code is as follows:
$ StrComputer = "."
$ ColItems = get-wmiobject-class "Win32_Product"-namespace "root \ CIMV2 "'
-Computername $ strComputer
Foreach ($ objItem in $ colItems ){
Write-host "Caption:" $ objItem. Caption
Write-host "Description:" $ objItem. Description
Write-host "Identifying Number:" $ objItem. IdentifyingNumber
Write-host "Installation Date:" $ objItem. InstallDate
Write-host "Installation Date 2:" $ objItem. InstallDate2
Write-host "Installation Location:" $ objItem. InstallLocation
Write-host "Installation State:" $ objItem. InstallState
Write-host "Name:" $ objItem. Name
Write-host "Package Cache:" $ objItem. PackageCache
Write-host "SKU Number:" $ objItem. SKUNumber
Write-host "Vendor:" $ objItem. Vendor
Write-host "Version:" $ objItem. Version
Write-host
}