Learning and Sharing
  • Home
  • Blog
  • Linux
  • macOS
  • VirtualBox
  • VMware
  • Windows
  • Series
    • Symantec
    • Intune
    • Microsoft Azure
    • Powershell
    • VirtualBox
    • VMware
    • PowerShell Learning
    • Microsoft Graph
  • More
    • Auto Installation
    • AEC Installation
  • Contact
No Result
View All Result
  • Home
  • Blog
  • Linux
  • macOS
  • VirtualBox
  • VMware
  • Windows
  • Series
    • Symantec
    • Intune
    • Microsoft Azure
    • Powershell
    • VirtualBox
    • VMware
    • PowerShell Learning
    • Microsoft Graph
  • More
    • Auto Installation
    • AEC Installation
  • Contact
No Result
View All Result
No Result
View All Result

How to Enable TLS Version 1.2 on Windows 7

July 14, 2023
in Blog, Powershell, Windows 7
0
ADVERTISEMENT

Table of Contents

No longer supports TLS versions 1.0 and 1.1

By default, earlier PowerShell versions use SSL 3.0 and TLS 1.0 to establish secure HTTPS connections to repositories.  Windows 7 enables SSL 3.0 and TLS 1.0 by default.

[enum]::GetNames([System.Net.SecurityProtocolType])
gEkO1ieXMnO9vIcksOtQLrG7Z22fNGOO2xAJdrhhU3r8BrInbnmQMkiY2i3m

According to Microsoft documentation TLS 1.2 is enabled by default on Windows editions. But in some cases, if it not enabled, you can check and enable it manually.

TLS protocol version support

🟢 = Enabled by default | ❌ = Not enabled by default

For example, as of April 2020, the PowerShell Gallery no longer supports Transport Layer Security (TLS) versions 1.0 and 1.1. Client must use TLS 1.2 or higher to establish a connection to the repository. When connecting to the repository on Windows 7, you would get the following error.

PS C:\Users\bonben> Install-Module -Name ExchangeOnlineManagement
The term 'Install-Module' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:15
+ Install-Module <<<<  -Name ExchangeOnlineManagement
    + CategoryInfo          : ObjectNotFound: (Install-Module:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Enable TLS Version 1.2 on Windows 7

Upgrade PowerShell in Windows 7

1️⃣ Before you begin, you need to upgrade the PowerShell version in Windows 7 to PSVersion 5.1. The preinstalled PowerShell version in Windows 7 is 2.0.50727.5420.

PS C:\Users\bonben> $PSVersionTable
Name                           Value
----                           -----
CLRVersion                     2.0.50727.5420
BuildVersion                   6.1.7601.17514
PSVersion                      2.0
WSManStackVersion              2.0

2️⃣ To update to PowerShell 5.1, let open PowerShell as administrator then run the below commands:

Import-Module BitsTransfer
$arch=(Get-WmiObject -Class Win32_operatingsystem).Osarchitecture

If ($arch -eq "32-bit") {
    $kbUrl32 = "https://filedn.com/lOX1R8Sv7vhpEG9Q77kMbn0/2023/Win7-KB3191566-x86.msu"
    $kb32 = "Win7-KB3191566-x86.msu"
    Start-BitsTransfer -source $kbUrl32
    wusa $kb32 /log:install.log
}
Else {
    $kbUrl64 = "https://filedn.com/lOX1R8Sv7vhpEG9Q77kMbn0/2023/Win7AndW2K8R2-KB3191566-x64.msu"
    $kb64 = "Win7AndW2K8R2-KB3191566-x64.msu"
    Start-BitsTransfer -source $kbUrl64
    wusa $kb64 /log:install.log
}

Once done, you can verify the PowerShell version using $PSVersionTable.

PS C:\Users\bonben> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.14409.1005
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14409.1005
CLRVersion                     4.0.30319.34209
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Enable TLS 1.2 on Windows 7

3️⃣ Once the PowerShell version is upgraded, we need to install the KB3140245 Windows update from the Microsoft Update Catalog. This update will create the registry key paths in which you will create new registry keys. These registry keys will allow you to enable TLSv1.2 on your Windows 7.

You can visit the KB’s link, download then install it manually. We love PowerShell, so we will install it using the below commands:

Note Note: The commands must be executed in an elevated PowerShell console.
Import-Module BitsTransfer
$arch=(Get-WmiObject -Class Win32_operatingsystem).Osarchitecture

If ($arch -eq "32-bit") {
    $kbUrl32 = "http://download.windowsupdate.com/c/msdownload/update/software/updt/2016/04/windows6.1-kb3140245-x86_cdafb409afbe28db07e2254f40047774a0654f18.msu"
    $kb32 = "windows6.1-kb3140245-x86_cdafb409afbe28db07e2254f40047774a0654f18.msu"
    Start-BitsTransfer -source $kbUrl32
    wusa $kb32 /log:install.log
}
Else {
    $kbUrl64 = "http://download.windowsupdate.com/c/msdownload/update/software/updt/2016/04/windows6.1-kb3140245-x64_5b067ffb69a94a6e5f9da89ce88c658e52a0dec0.msu"
    $kb64 = "windows6.1-kb3140245-x64_5b067ffb69a94a6e5f9da89ce88c658e52a0dec0.msu"
    Start-BitsTransfer -source $kbUrl64
    wusa $kb64 /log:install.log
}

4️⃣ You may ask to restart your computer. Let’s restart it to continue.

5️⃣ Now, this is time to add registry keys for TLS versions 1.1 and 1.2. Once again, PowerShell is the best tool to do. Just simple copy the below commands then paste into the opening PowerShell window.

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

Set-ItemProperty `
    -Path 'HKLM:\SOFTWARE\Microsoft\.NetFramework\v4.0.30319' `
    -Name 'SchUseStrongCrypto' -Value '1' -Type DWord

6️⃣ Restart your computer to take the changes go into effect.

Check if the TSL 1.2 is enable on Windows 7

7️⃣ To check your current settings in the Microsoft .NET Framework, run the following command in Windows PowerShell:

[Net.ServicePointManager]::SecurityProtocol

As you can see, now, your Windows can access websites and apps require TLS 1.2.

6cVeUrMQjVUl44JOSjLvzfvjU3P1maYucxcY3TDtAKIGPfHKHQBopxXyUg2X

8️⃣ To list the available protocols on your local workstation, and on your local Powershell profile you’re using, let’s run the following command:

[enum]::GetNames([System.Net.SecurityProtocolType])
TdBSMMjwMnFZVtLr9UFH3Sh4jYRBXeaUQIcfgoPEx0fYTjHsZ2U55cpDxIpt

9️⃣ To verify it’s working. We’ve install the Exchange Online PowerShell module. To install that module, the PowerShell need to connect to PSGalery using TLS 1.2.

PS C:\Users\bonben> Install-Module -Name ExchangeOnlineManagement

NuGet provider is required to continue
PowerShellGet requires NuGet provider version '2.8.5.201' or newer to interact with NuGet-based repositories. The NuGet
 provider must be available in 'C:\Program Files\PackageManagement\ProviderAssemblies' or
'C:\Users\bonben\AppData\Local\PackageManagement\ProviderAssemblies'. You can also install the NuGet provider by
running 'Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force'. Do you want PowerShellGet to install
and import the NuGet provider now?
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"): Y

Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its
InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from
'PSGallery'?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "N"): A
PS C:\Users\bonben> Get-InstalledModule

Version    Name                                Repository           Description
-------    ----                                ----------           -----------
3.1.0      ExchangeOnlineManagement            PSGallery            This is a General Availability (GA) release of t...

That’s it, hope this post can help you to enable and use TLS 1.2 on your Windows 7 computer.

5/5 - (1 vote)
Previous Post

How to Bypass the Internet Connection When Installing Windows 11

Next Post

Installation Failed Error Message 404 WordPress on CyberPanel

Related Posts

Ftr21

Export Microsoft 365 Disabled Users Report Using Microsoft Graph

December 7, 2023
Ftr22

Export List of Users with Managers Name and UPN in Microsoft 365

December 7, 2023
Ftr38

How to Split an Email Addresses From @ with PowerShell

December 5, 2023
Ftr38

[WinForms] Creating GUIs in Windows PowerShell with WinForms

November 15, 2023
Ftr21

Converting DateTime Obtained from Microsoft Graph Call to PowerShell Date and Time Format

October 21, 2023
Ftr21

How to Get Microsoft 365 License Expiration Dates using Graph Api

December 7, 2023

Leave a Reply Cancel reply

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

Recent Posts

  • How to Enable Outlook Modern Authentication from Registry Setting
  • Export Microsoft 365 Disabled Users Report Using Microsoft Graph
  • Export List of Users with Managers Name and UPN in Microsoft 365

Categories

Stay in Touch

Discord Server

Join the Discord server with the site members for all questions and discussions.

Telegram Community

Jump in Telegram server. Ask questions and discuss everything with the site members.

Youtube Channel

Watch more videos, learning and sharing with Leo ❤❤❤. Sharing to be better.

Newsletter

Join the movement and receive our weekly Tech related newsletter. It’s Free.

General

Microsoft Windows

Microsoft Office

VMware

VirtualBox

Technology

PowerShell

Microsoft 365

Microsoft Teams

Email Servers

Copyright 2023 © All rights Reserved. Design by Leo with ❤

No Result
View All Result
  • Home
  • Linux
  • Intune
  • macOS
  • VMware
  • VirtualBox
  • Powershell
  • Windows 10
  • Windows 11
  • Microsoft 365
  • Microsoft Azure
  • Microsoft Office
  • Active Directory