Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Reading information from the registry

$
0
0

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.  


Viewing all articles
Browse latest Browse all 6937

Trending Articles