How to Log SSL/TLS Protocol Usage in IIS for Exchange Server SE & 2019 (CRYPT_PROTOCOL Guide)

Before disabling legacy TLS 1.0 and TLS 1.1 (or enforcing strict TLS 1.2 / TLS 1.3) on Exchange Server Subscription Edition (SE), 2019, or 2016, you need definitive proof of which TLS protocol versions connecting clients—Outlook Desktop, OWA, ActiveSync mobile devices, and EWS scripts—are actually negotiating on the wire.

By adding the Windows CRYPT_PROTOCOL (and optional CRYPT_CIPHER_ALG_ID) server variables to IIS W3C Extended Logging on your Exchange Default Web Site and Exchange Back End, IIS records the exact negotiated Schannel TLS hexadecimal code on every HTTP request.


IIS Schannel TLS Logging & Decoding Architecture

Exchange Server IIS SSL/TLS Protocol Auditing Pipeline 1. TLS Handshake (IIS) Client connects to OWA, ActiveSync, EWS, MAPI/HTTP or Autodiscover on Port 443. Schannel populates variables 2. Custom W3C Log Fields CRYPT_PROTOCOL • 400 = TLS 1.0 (Server) • 1000 = TLS 1.1 (Server) • 4000 = TLS 1.2 (Server) • 10000 = TLS 1.3 (Server) 3. Parse W3SVC1 Logs PowerShell groups requests by TLS Version, Client IP, and User-Agent to pinpoint legacy TLS 1.0/1.1 devices. Note on Log File Suffix: Once a custom field is added in IIS, new log files are written with an _x suffix (e.g., u_exYYMMDD_x.log).

Instead of manually clicking through IIS Manager on every DAG node, run this elevated PowerShell snippet to register crypt-protocol (CRYPT_PROTOCOL) and crypt-cipher (CRYPT_CIPHER_ALG_ID) on Default Web Site:

POWERSHELL
Import-Module WebAdministration

$SitePath = "IIS:\Sites\Default Web Site"

# Add CRYPT_PROTOCOL custom W3C logging field
Add-WebConfigurationProperty -PSPath $SitePath `
    -Filter "system.applicationHost/sites/siteDefaults/logFile/customFields" `
    -Name "." `
    -Value @{
        logFieldName = "crypt-protocol"
        sourceName   = "CRYPT_PROTOCOL"
        sourceType   = "ServerVariable"
    } -ErrorAction SilentlyContinue

Write-Host "[+] Enabled CRYPT_PROTOCOL custom field on Default Web Site." -ForegroundColor Green

Method 2: Enable via IIS Manager GUI

  1. Open Internet Information Services (IIS) Manager on your Exchange Server.
  2. Expand Sites > select Default Web Site.
  3. Double-click Logging in the middle pane and click Select Fields....
  4. Under Custom Fields, click Add Field...:

- Field Name: crypt-protocol - Source Type: Server Variable - Source: CRYPT_PROTOCOL

  1. Click OK, then click Apply in the Actions pane.

CRYPT_PROTOCOL Hex Value Reference Table

Schannel logs the hexadecimal constant (SP_PROT_*_SERVER) representing the server-side negotiated protocol:

Logged Hex Value (crypt-protocol)Protocol VersionSecurity Status
40SSL 3.0Critical Risk (Disable Immediately)
400TLS 1.0Deprecated / Insecure
1000TLS 1.1Deprecated / Insecure
4000TLS 1.2Recommended Baseline
10000TLS 1.3Modern Standard (Windows Server 2022/2025)

PowerShell Script: Parse IIS Logs and Summarize TLS Usage by Client IP

Run the script below against your Exchange IIS log directory (C:\inetpub\logs\LogFiles\W3SVC1) to decode the hex values and identify any legacy devices still using TLS 1.0 (400) or TLS 1.1 (1000):

POWERSHELL
$LogDir = "C:\inetpub\logs\LogFiles\W3SVC1"
$LatestLog = Get-ChildItem -Path $LogDir -Filter "*_x.log" | Sort-Object LastWriteTime -Descending | Select-Object -First 1

$ProtocolMap = @{
    "40"    = "SSL 3.0"
    "400"   = "TLS 1.0"
    "1000"  = "TLS 1.1"
    "4000"  = "TLS 1.2"
    "10000" = "TLS 1.3"
    "-"     = "Unencrypted / HTTP"
}

$Lines = Get-Content $LatestLog.FullName
$FieldLine = ($Lines | Where-Object { $_ -like "#Fields:*" } | Select-Object -First 1) -replace "^#Fields:\s+", ""
$Headers = $FieldLine -split "\s+"

$Records = $Lines | Where-Object { $_ -notlike "#*" } | ConvertFrom-Csv -Delimiter " " -Header $Headers

$Records | Group-Object crypt-protocol | ForEach-Object {
    $Hex = $_.Name
    [PSCustomObject]@{
        HexCode         = $Hex
        TLSVersion      = if ($ProtocolMap.ContainsKey($Hex)) { $ProtocolMap[$Hex] } else { "Unknown ($Hex)" }
        RequestCount    = $_.Count
    }
} | Sort-Object RequestCount -Descending | Format-Table -AutoSize

For SMTP transport-level TLS logging on Send and Receive Connectors, see our Configure Protocol Logging in Exchange Server Guide.

đź’¬ Reader Comments & Feedback

Did this runbook help, or did Microsoft change a cmdlet or UI menu? Share your feedback below.