Posted On August 2, 2022

PowerShell: Enable TLS 1.2 on Windows

kimconnect 0 comments
blog.KimConnect.com >> Windows >> PowerShell: Enable TLS 1.2 on Windows
function enableTls12{
	try{
		$null=New-Item 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server' -Force
		$null=New-Item 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client' -Force
		$null=New-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server' -name 'Enabled' -value '1' –PropertyType 'DWORD'
		$null=New-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server' -name 'DisabledByDefault' -value '0' –PropertyType 'DWORD'
		$null=New-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client' -name 'Enabled' -value '1' –PropertyType 'DWORD'
		$null=New-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client' -name 'DisabledByDefault' -value '0' –PropertyType 'DWORD'
		Write-Host "TLSv1.2 has been enabled on $env:computername"
	}catch{
		write-warning $_
	}
}

enableTls12

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

Windows: Disable Low Disk Space Warning

To disable these balloon messages follow the steps below: 1. Open the Registry Editor by…

NaN

- Meaning: Not a Number - When used as an assignment to an element index…

Audit Logon Successes & Failures on All Domain Controllers

Issue: In a realistic situation, InfoSec would notify DBAdmins and SysAdmins of failed logon alerts…