Powershell – Explicitly Check the Enabled SSL-TLS Protocols WinHTTP

# Author: Kerry Cordero
# Version: 1.0.0
# Description: This script will check the Enabled SSL-TLS Protocols WinHTTP

$Protocols = "SSL 2.0","SSL 3.0","TLS 1.0","TLS 1.1","TLS 1.2","TLS 1.3"

foreach ($Protocol in $Protocols) {
    $ClientKeyPath = "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\$Protocol\Client"
    $ServerKeyPath = "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\$Protocol\Server"
    
    $ClientEnabled = (Get-ItemProperty -Path $ClientKeyPath -Name Enabled -ErrorAction SilentlyContinue).Enabled
    $ServerEnabled = (Get-ItemProperty -Path $ServerKeyPath -Name Enabled -ErrorAction SilentlyContinue).Enabled

    Write-Output "$Protocol - Client Enabled: $ClientEnabled, Server Enabled: $ServerEnabled"
}