ISW-Tools

.NET Framework TLS Konfiguration ermitteln und setzen

Jörn Walter Veröffentlicht Aktualisiert 1 Min. Lesezeit Skripte

# Konfiguration ermitteln
[Net.ServicePointManager]::SecurityProtocol

# Konfiguration einzeln setzen
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::TLS
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::TLS11[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::TLS12

# Konfiguration all in One
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls, [System.Net.SecurityProtocolType]::Tls11,[System.Net.SecurityProtocolType]::Tls12

# Registry Einträge setzen

.NET 4.x
Set-ItemProperty -Path ‚HKLM:\SOFTWARE\Microsoft\.NetFramework\v4.0.30319‘ -Name ‚SchUseStrongCrypto‘ -Value ‚1‘ -Type DWord

Set-ItemProperty -Path ‚HKLM:\SOFTWARE\Wow6432Node\Microsoft\.NetFramework\v4.0.30319‘ -Name ‚SchUseStrongCrypto‘ -Value ‚1‘ -Type DWord

.NET 3.5
Set-ItemProperty -Path ‚HKLM:\SOFTWARE\Microsoft\.NetFramework\v2.0.50727‘ -Name ‚SchUseStrongCrypto‘ -Value ‚1‘ -Type DWord

Set-ItemProperty -Path ‚HKLM:\SOFTWARE\Wow6432Node\Microsoft\.NetFramework\v2.0.50727‘ -Name ‚SchUseStrongCrypto‘ -Value ‚1‘ -Type DWord

# .NET Konfigurationsdatei anpassen

TLS 1.2 nicht systemweit aktivieren sondern nur auf eine beliebige Anwendung. Dazu muss dieser Schalter in den Abschnitt <runtime> kopiert werden.
<runtime>
<AppContextSwitchOverrides value=“Switch.System.Net.DontEnableSchUseStrongCrypto=false“ />
<runtime>

TLS 1.2 Fix für .NET Framework unter Windows 10
https://www.catalog.update.microsoft.com/Search.aspx?q=kb4458166

Porträt Jörn Walter

Jörn Walter

Inhaber von IT-Service Walter in Euskirchen, betreut Windows-Umgebungen von Unternehmen und entwickelt die ISW-ADTools.

Alle Beiträge von Jörn Walter