title: Test-Path prints false even if the path exists in registry
body: <p>While debugging a script in VS code's Powershell Integrated Console if I test for a registry path it's printing False even though the path exists.
  <a href="https://i.stack.imgur.com/KJZxN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KJZxN.png" alt="Failure message"></a></p>
  
  <p>If I execute the same instruction in PowerShell window or VS Code's Powershell Console it prints True.
  <a href="https://i.stack.imgur.com/SH20o.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SH20o.png" alt="Success message"></a>
  I am running all instances with Admin privileges.</p>