Get an application name from its uninstall GUID

I have tried this script but the result came with no result.

Get-ChildItem -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall", "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall" | Get-ItemProperty | select-object displayname, UninstallString | Where-Object { $_.UninstallString -contains 'B96F6FA1-530F-42F1-9F71-33C583716340'} 

If you add line breaks after the pipes your code would be easier to read. :wink:

The operator -contains looks for an element in an array of elements. And it has to be an exact match. So it will not work when you try to find a part of a given string. You can use the -match operator instead. Or - when you add asterisks in front and at the end of your GUID - you could use -like.

$Path = 
'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall', 
'HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall'
$GUID = 'B96F6FA1-530F-42F1-9F71-33C583716340'

Get-ChildItem -Path $Path | 
    Get-ItemProperty | 
        Select-Object -Property displayname, UninstallString | 
            Where-Object { $_.UninstallString -match $GUID }

Awesome!!! Thank you for the explanation. It now works as expected.
Thank you Olaf!