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
Method 1: Enable CRYPT_PROTOCOL Across Exchange IIS Sites via PowerShell (Recommended)
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:
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
- Open Internet Information Services (IIS) Manager on your Exchange Server.
- Expand Sites > select Default Web Site.
- Double-click Logging in the middle pane and click Select Fields....
- Under Custom Fields, click Add Field...:
- Field Name: crypt-protocol
- Source Type: Server Variable
- Source: CRYPT_PROTOCOL
- 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 Version | Security Status |
|---|---|---|
40 | SSL 3.0 | Critical Risk (Disable Immediately) |
400 | TLS 1.0 | Deprecated / Insecure |
1000 | TLS 1.1 | Deprecated / Insecure |
4000 | TLS 1.2 | Recommended Baseline |
10000 | TLS 1.3 | Modern 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):
$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.
Leave a Comment or Report an Update