Showing results for 
Search instead for 
Did you mean: 
Create Post

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.  

Labels (2)

Your script doesn't have a statistic.   All sam script monitors require statistic outputs.

Version history
Revision #:
1 of 1
Last update:
‎04-08-2020 12:09 PM
Updated by: