Method 4: Using Get-WmiObject (Win32_Product) - Slower
This method uses WMI (Windows Management Instrumentation) but can be slower and might not list all installed applications, especially those installed per-user.
The output will vary based on the installed programs, but a typical result might look like:
DisplayName DisplayVersion Publisher
----------- -------------- ---------
Microsoft Edge 123.45.6789.0 Microsoft Corporation
Google Chrome 123.4.5678.90 Google LLC
Considerations
Permissions: You might need to run PowerShell as an administrator to access all registry keys.
Per-User Installations: Some programs are installed per-user and might not be listed in the HKLM registry keys. You'd need to check HKCU (HKEY_CURRENT_USER) as well.
Speed:Get-WmiObject can be significantly slower than registry-based methods.