# Define the registry paths for 32-bit and 64-bit applications $registryPaths = @( "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall", "HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall" ) # Initialize an array to store application information $applications = @() # Loop through each registry path foreach ($registryPath in $registryPaths) { # Get the registry keys for each application $keys = Get-ChildItem -Path $registryPath foreach ($key in $keys) { # Get the application properties $app = Get-ItemProperty -Path $key.PSPath # Add the application information to the array $applications += [PSCustomObject]@{ Name = $app.DisplayName Version = $app.DisplayVersion Publisher = $app.Publisher InstallDate = $app.InstallDate Size = $app.EstimatedSize } } } # Filter out applications with no name $applications = $applications | Where-Object { $_.Name -ne $null } # Display the applications $applications | Select-Object Name, Version, Publisher, InstallDate, Size | Format-Table -AutoSize