Script to List All Things in "Add/Remove Programs"

Script to List All Things in "Add/Remove Programs"

This PowerShell script retrieves and lists all the programs available in the "Add/Remove Programs" section of a Windows device. It organizes the data by name, version, and local package path.

Script

get-wmiobject Win32_Product | Sort-Object -Property Name |Format-Table Name, Version, LocalPackage -AutoSize

Explanation

  1. Get-WmiObject Win32_Product: Queries installed software via WMI (Windows Management Instrumentation) to retrieve program details.
  2. Sort-Object -Property Name: Orders the list alphabetically by the program name.
  3. Format-Table: Formats the output as a table showing the program name, version, and local package path for better readability.

Prerequisites

  • Run the script with administrative privileges to ensure full access to WMI.
  • Ensure PowerShell is installed and updated to a compatible version on your system.

Expected Output

The script outputs a table displaying:

  • Name: Program name
  • Version: Program version number
  • LocalPackage: Path to the local installation package (if available)

Notes

  • This script focuses on applications installed using MSI. Other programs installed through alternative methods (e.g., manual installations, ZIP archives) may not appear.
  • For troubleshooting, ensure WMI services are running on your device.

 

Was this article helpful?
0 out of 0 found this helpful