I'm trying to check the registry for the lookback check flag thus:

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

This always returns $false when in fact the value does actually exist. Ive tried -PathType leaf and -PathType Any with the same result.

Anyone got any ideas?

Thanks

link|improve this question
feedback

1 Answer

up vote 1 down vote accepted

Isn't DisableLoobackCheck a property of HKLM:\System\CurrentControlSet\Control\Lsa?

You can test-path HKLM:\System\CurrentControlSet\Control\Lsa to see if that path exists, but you need to use Get-ItemProperty to inspect the properties the Lsa key.

I think this Test-PathReg script does what you want.

link|improve this answer
I tried Get-ItemProperty and that also failed but the linked script works wonderfully. Thanks!!! – Jonesie Dec 9 '10 at 23:30
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.