Reputation: 3024
I'm getting different results when I interrogate my registry, depending on the method used. Why is this? Is it some 32-bit v 64-bit trickiness? How do I get the RegEdit answers via PowerShell?
Method 1 - RegEdit
If I browse to HKLM\SOFTWARE in RegEdit.exe, I see a list of subkeys, starting with:
7-Zip
Alps
Method 2 - PowerShell
ForEach-Object{Get-ChildItem -Path 'HKLM:\SOFTWARE'} | Select PSChildName
produces a list, starting with:
Adobe
ATI
Method 3 - reg query
Just for fun I tried a third method I discovered while hunting on Stack Overflow for an answer:
reg query hklm\SOFTWARE
returns a list, starting with:
HKEY_LOCAL_MACHINE\SOFTWARE\Adobe
HKEY_LOCAL_MACHINE\SOFTWARE\ATI
Upvotes: 1
Views: 983
Reputation: 3024
Credit to user3211152 and Matt...
I can see the 32-bit keys under the HKLM\Software\WOW6432Node
. But also, I discovered that I was running my PowerShell in the Windows PowerShell ISE (x86) shell. When I changed to the Windows PowerShell ISE shell, I could see the other data (ie the same my RegEdit example in my question).
Upvotes: 1