title: Set-ItemProperty sets Registry Value as String on some systems instead of DWord, why?
body: <p>I try to create an item using <code>Set-ItemProperty</code> in PowerShell, which works on most systems:</p>
  
  <pre><code>New-PSDrive -name HKCR -PSProvider Registry -root HKEY_CLASSES_ROOT
  
  Set-ItemProperty -Path HKCR:\Software\MyCompany\ -Name Level -Value 5 -ErrorAction SilentlyContinue 
  </code></pre>
  
  <p>This creates a DWORD-value on most Windows 7 systems, but I have found one system where this creates a STRING-value instead, and I want to know: why? What could happen that the systems behave differently? All don't have that value already set, all use the same base image using the same Powershell version.</p>
  
  <p>Btw, I found that by using the following code, I can explicitly set a type, so I already solved the problem:</p>
  
  <pre><code>New-ItemProperty -Path HKCR:\Software\MyCompany\ -Name Level -Value 5 -ErrorAction SilentlyContinue -PropertyType DWord
  </code></pre>
  
  <p>But just for curiosity, I want to know why the systems behave differently.</p>