diff --git a/Tools.ps1 b/Tools.ps1 index 62682d0..89e02fd 100644 --- a/Tools.ps1 +++ b/Tools.ps1 @@ -744,5 +744,18 @@ function EnumUserProfiles { Return $UserProfilePaths } +# Function to test for the presense of a Registry property +function Test-RegistryProperty { + param( + [Parameter(Mandatory=$true)][string]$Path, + [Parameter(Mandatory=$true)][string]$Name + ) + Try { + Get-ItemProperty -Path $Path | Select-Object -ExpandProperty $Name -ErrorAction Stop | Out-Null + Return $true + } + Catch { Return $false } +} + Setup-MSPDirectories Setup-LogFile \ No newline at end of file