Geeks With Blogs
I, Computer http://marcdekeyser.com
Disclaimer: Code is not mine but forgot where I got it. Ping me if this is yours and you will receive full kudos to it :)

function Test-Key([string]$path, [string]$key)
{
    if(!(Test-Path $path)) { return $false }
    if ((Get-ItemProperty $path).$key -eq $null) { return $false }
    return $true
}

Posted on Wednesday, December 5, 2012 8:14 AM | Back to top


Comments on this post: Powershell Test Reg Key function

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © marc dekeyser | Powered by: GeeksWithBlogs.net | Join free