2019-12-13 09:48:00 -05:00
|
|
|
################################################################################
|
2023-11-16 11:20:11 +01:00
|
|
|
## File: Configure-DotnetSecureChannel.ps1
|
|
|
|
|
## Desc: Configure .NET to use TLS 1.2
|
2019-12-13 09:48:00 -05:00
|
|
|
################################################################################
|
|
|
|
|
|
|
|
|
|
$registryPath = "HKLM:\SOFTWARE\Microsoft\.NETFramework\v4.0.30319"
|
|
|
|
|
$name = "SchUseStrongCrypto"
|
|
|
|
|
$value = "1"
|
2023-11-16 11:20:11 +01:00
|
|
|
if (Test-Path $registryPath) {
|
2019-12-13 09:48:00 -05:00
|
|
|
Set-ItemProperty -Path $registryPath -Name $name -Value $value -Type DWORD
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$registryPath = "HKLM:\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319"
|
2023-11-16 11:20:11 +01:00
|
|
|
if (Test-Path $registryPath) {
|
2019-12-13 09:48:00 -05:00
|
|
|
Set-ItemProperty -Path $registryPath -Name $name -Value $value -Type DWORD
|
2020-07-13 16:17:49 +03:00
|
|
|
}
|