As Lee_Dailey mentioned, you can get this information from the uninstall key in the registry.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
The following will get you the Name and GUID of applications installed with an entry in the uninstall key. The -match "^{.+}$"
returns only entries that begin with {
and end with }
. If you want the GUID output without the braces {}
then you can cast it to [GUID]
, e.g. [GUID][String]$matches.Values
.
Get-ChildItem HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall |
%{
if(($_.Name | Split-Path -Leaf) -match "^{.+}$")
{
[PSCustomObject]@{
GUID = [String]$matches.Values
Name = [String]($_ | Get-ItemProperty -ErrorAction SilentlyContinue).DisplayName
}
}
}
Outputs:
GUID Name
---- ----
{0CA4BB37-FF4A-42C6-A39C-11CB0BB8D395} Microsoft .NET Core Host - 2.1.8 (x64)
{1657ABEE-7D56-416A-B7E0-A89CC5AAD0F7} Microsoft Azure Compute Emulator - v2.9.6
...