This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Need some help with tls monitoring

Hi all.

I created a powershell script to check the registry to see if TLS 1.2 is enabled or not.  

$regKey = 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\tls 1.2\server'
$regProperty = 'enabled'
$target_value = 1

$reg_value = (Get-ItemProperty -Path $regKey -name $regProperty).$regProperty

Write-Host "Message: '$regKey\$regProperty' is currently set to '$reg_value'"
if ($reg_value -eq $target_value) {
Write-Host "Reg property value is equal to target value"
} else {
Write-Host "Reg property value is not equal to target value"
}

When I test it shows the correct answer but is listed as unknown.  The agent is installed on the machine in question.  Any input is greatly appreciated.  

Revisions to this script are also appreciated.