⚡ PowerShell 5.1+

Get Installed MSI Products Report

Queries Win32_Product via WMI and reports Installed MSI Products in a formatted table, with an optional CSV export.

By WindowsScripting.com · 910 B
Get-ProductReport.ps1
<#
.SYNOPSIS
    Reports Installed MSI Products on this computer via WMI (Win32_Product).

.DESCRIPTION
    Queries Win32_Product and displays Name, Version, Vendor, InstallDate for each item found.
    Use -ExportPath to also save the results to a CSV file.

.PARAMETER ExportPath
    Optional path to a .csv file to write the results to.

.EXAMPLE
    .\Get-ProductReport.ps1

.EXAMPLE
    .\Get-ProductReport.ps1 -ExportPath C:\Reports\product.csv
#>

[CmdletBinding()]
param(
    [string]$ExportPath
)

$items = Get-CimInstance -ClassName Win32_Product | Select-Object Name, Version, Vendor, InstallDate

if (-not $items) {
    Write-Host "No Installed MSI Products found." -ForegroundColor Yellow
    return
}

$items | Format-Table -AutoSize

if ($ExportPath) {
    $items | Export-Csv -Path $ExportPath -NoTypeInformation -Encoding UTF8
    Write-Host "`nExported to $ExportPath" -ForegroundColor Cyan
}