I am trying to extract information from the registry for installed software. I have this code that works.
Get-ChildItem HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall, HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall |
ForEach-Object {Get-ItemProperty$_.pspath}
A snippet of information it returns.
DisplayName : Windows Resource Kit Tools
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{FA237125-51FF-408C-8BB8-30C2B3DFFF9C}
I wanted to change $_.pspath to $.DisplayName yet when I do that I get nothing but errors. Why? DisplayName is there.
Thanks.