Powershelltestingpath无法findregistry项

我试图检查registry的回溯检查标志,因此:

Test-Path HKLM:\System\CurrentControlSet\Control\Lsa\DisableLoopbackCheck 

当这个值实际上存在时,总是返回$false 。 我已经尝试了-PathType leaf-PathType Any具有相同的结果。

任何人有任何想法?

谢谢。

不是DisableLoobackCheck HKLM的一个属性:\ System \ CurrentControlSet \ Control \ Lsa?

您可以testingpathHKLM:\ System \ CurrentControlSet \ Control \ Lsa以查看该path是否存在,但您需要使用Get-ItemProperty来检查Lsa项的属性。

我认为这个Test-PathReg脚本是你想要的 。