title: REG EXPORT single value to .reg file
body: <p>I want to export a single registry value to a file using PowerShell (eventually scripting to backup a bunch of registry values).</p>
  <p>I can view the file with QUERY:</p>
  <pre><code>REG QUERY &quot;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa&quot; /v LimitBlankPasswordUse
  &gt;&gt;
  HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
      LimitBlankPasswordUse    REG_DWORD    0x1
  </code></pre>
  <p>However, I can't export the single value.</p>
  <p><code>REQ EXPORT</code> has no <code>/v</code> flag, so:</p>
  <pre><code>REG EXPORT &quot;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa&quot; \v &quot;LimitBlankPasswordUse&quot; LBPU.reg
  ERROR: Invalid syntax.
  </code></pre>
  <p>Doesn't work.</p>
  <p>If I try to export the value I get:</p>
  <pre><code>REG EXPORT &quot;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\LimitBlankPasswordUse&quot; LBPU.reg
  ERROR: The system was unable to find the specified registry key or value.
  </code></pre>
  <p>And if I simply do the folder:</p>
  <pre><code>REG EXPORT &quot;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\&quot; Lsa.reg
  The operation completed successfully.
  </code></pre>
  <p>I get a .reg file which includes the correct value:key pair <code>&quot;LimitBlankPasswordUse&quot;=dword:00000001</code> - but also all the others. Which is no use. I want one pair, not hundreds.</p>
  <p>How do I export a single value to a .reg file?</p>