title: Find values in registry subkeys and delete them
body: <p>I'm trying to write a simple script in PowerShell (trying to keep it to one line) that will:</p>
  
  <ul>
  <li>Recursively list all the subkeys in a registry key</li>
  <li>Find one that has a specific value</li>
  <li>Delete a different value of the subkey found in the previous step</li>
  </ul>
  
  <p>This is my code so far:</p>
  
  <pre><code>Get-ChildItem "HKLM:\Software\Microsoft\KeyToQuery" -Recurse | Where-Object {$_.ValueA -eq "True"}
  </code></pre>
  
  <p>Beneath "KeyToQuery" is several subkeys of random names that contain identical values.</p>
  
  <p>The first part of this works, but the Where-Object statement never evaluates to true. I also tried -match and -like to no avail.</p>
  
  <p>Where am I going wrong?</p>