Below code can be quick and easy to get the list.
# Get all installed applications
$installedApplications = Get-WmiObject -Class Win32_Product
# Output information about each installed application
foreach ($app in $installedApplications) {
Write-Output "Name: $($app.Name)"
Write-Output "Version: $($app.Version)"
Write-Output "Vendor: $($app.Vendor)"
Write-Output "InstallDate: $($app.InstallDate)"
Write-Output "-----------------------------"
}
As you know, use $app object and get more and more details that written above.
If this one does not work for some reason, you can try another one:
Somehow it runs faster for me than the above one.
# Define the registry path where installed applications are stored
$registryPath = "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*"
# Get all installed applications from the registry
$installedApplications = Get-ItemProperty -Path $registryPath |
Where-Object { $_.DisplayName -and $_.DisplayName -ne "" } |
Select-Object DisplayName, DisplayVersion, Publisher, InstallDate
# Output information about each installed application
foreach ($app in $installedApplications) {
Write-Output "Name: $($app.DisplayName)"
Write-Output "Version: $($app.DisplayVersion)"
Write-Output "Publisher: $($app.Publisher)"
Write-Output "InstallDate: $($app.InstallDate)"
Write-Output "-----------------------------"
}
Hope you liked this post.
Thanks!!
No comments:
Post a Comment