title: Powershell - Get Data of Registry Value Saved to a Variable
body: <p>I need to save a single data item in a registry key to a variable. I've tried the following without any luck:</p>
  
  <pre><code>$dxVersion = (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\DirectX").GetValue("Version",$null)
  </code></pre>
  
  <p>I want JUST the version number saved to the variable, nothing else. Not the name, just the data.</p>
  
  <p>Thanks in advance for your help!</p>