Blog Stats
  • Posts - 74
  • Articles - 1
  • Comments - 71
  • Trackbacks - 0

 

Powershell Test Reg Key function

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
}


Feedback

No comments posted yet.


Post A Comment
Title:
Name:
Email:
Comment:
Verification:
 
 

 

 

Copyright © marc dekeyser