title: Registry keys: PowerShell different from RegEdit
body: <p>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?</p>
  
  <p><strong>Method 1 - RegEdit</strong></p>
  
  <p>If I browse to HKLM\SOFTWARE in RegEdit.exe, I see a list of subkeys, starting with:</p>
  
  <pre><code>7-Zip
  Alps 
  </code></pre>
  
  <p><strong>Method 2 - PowerShell</strong> </p>
  
  <pre><code>ForEach-Object{Get-ChildItem -Path 'HKLM:\SOFTWARE'} | Select PSChildName
  </code></pre>
  
  <p>produces a list, starting with: </p>
  
  <pre><code>Adobe
  ATI
  </code></pre>
  
  <p><strong>Method 3 - reg query</strong></p>
  
  <p>Just for fun I tried a third method I discovered while hunting on Stack Overflow for an answer:</p>
  
  <pre><code>reg query hklm\SOFTWARE
  </code></pre>
  
  <p>returns a list, starting with: </p>
  
  <pre><code>HKEY_LOCAL_MACHINE\SOFTWARE\Adobe
  HKEY_LOCAL_MACHINE\SOFTWARE\ATI
  </code></pre>