- Trending Categories
- Data Structure
- Operating System
- MS Excel
- C Programming
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to change the TLS version in PowerShell?
Transport Layer Security known as TLS is a very important part while using URI commands such as Invoke−WebRequest or Invoke−Restmethod commands and package commands such as Find−Package or Install−Package because they interact on the internet and PowerShell needs TLS1.2 version for that.
We may get the below errors when we use the lower TLS version.
WARNING: Unable to download the list of available providers. Check your internet connection. WARNING: Unable to resolve package source 'https://www.powershellgallery.com/api/v2'. Find-Package : No match was found for the specified search criteria and package name
To resolve the above error, we need to change the TLS version. To check the existing TLS version, we can use the below command,
PS C:\> [Net.ServicePointManager]::SecurityProtocol Ssl3, Tls
To change the TLS version to 1.2 below command can be used.
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
- Related Articles
- How to install the specific version of the PowerShell module version?
- How to install the latest PowerShell module version?
- How to find the device driver version using PowerShell?
- How to check the PowerShell version installed in local and remote systems?
- How to find a network adapter driver version using PowerShell?
- How to change Azure Subscription in PowerShell?
- How to change the Drive letter using PowerShell?
- How to resolve - The underlying connection was closed - Could not\nestablish trust relationship for the SSL/TLS secure channel in PowerShell?
- How to change the background color of the font in PowerShell?
- How to change the local disk name using PowerShell?
- How to change the Azure tag value using PowerShell?
- How to change Pagefile settings using PowerShell?
- How to change the size of the Console using PowerShell?
- Which are the new Null Operators introduced in PowerShell version 7?
- How to change the local user account password using PowerShell?