title: Why is Powershell's Get-ItemProperty not returning the same values as seen in regedit.exe?
body: <p>I am setting up a machine for testing, and part of that is tinkering with some registry values. This is an Azure VM, and I am configuring it via Powershell.</p>
  
  <p>I am noticing many differences between the Registry values returned from <code>Get-ItemProperty</code> (in Powershell) and the Registry values I see in <code>regedit.exe</code>. Below is an example of one such difference:</p>
  
  <p><code>Get-ItemProperty</code>:</p>
  
  <blockquote>
    <p><a href="https://i.stack.imgur.com/XgyWq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XgyWq.png" alt="enter image description here"></a></p>
  </blockquote>
  
  <p><code>regedit.exe</code>:</p>
  
  <blockquote>
    <p><a href="https://i.stack.imgur.com/NQXKV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NQXKV.png" alt="enter image description here"></a></p>
  </blockquote>
  
  <p>Note <code>DefaultUserName</code> is set when viewed in <code>regedit.exe</code></p>
  
  <p>I am setting these properties using <code>New-ItemProperty</code> (with a <code>-Force</code> parameter). </p>
  
  <p>Any help is appreciated.</p>