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

Problem Solving Exercise: Auto Manufacturing Case

Sample Answer 1. Produce a problem statement:We are investigating the root cause of production delays…

Consideration to Convert Cisco VoIP to Asterisk

Benefits: - Cisco requires 20% maintenance fee yearly from Cisco partner - Cisco upgrade path…

match

- The match() method retrieves the matches when matching a string against a regular expression.…