WARNING: Unable to resolve package source 'https://www.powershellgallery.com/api/v2'

This post describes how I resolved the following:

WARNING: Unable to resolve package source 'https://www.powershellgallery.com/api/v2'

WARNING: Unable to resolve package source 'https //www.powershellgallery.com/api/v2'

Cause

This warning can occur when trying to install a PowerShell module and Tls12 is not specified as the SecurityProtocol.

You can check the SecurityProtocol by running this command in PowerShell:

[Net.ServicePointManager]::SecurityProtocol

[Net.ServicePointManager]::SecurityProtocol

Resolution

To resolve this issue, I set the SecurityProtocol to Tls12 by running this command in PowerShell:

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

Source: https://rnelson0.com/2018/05/17/powershell-in-a-post-tls1-1-world/

I was then able to install PowerShell modules successfully.

Install PowerShell module successfully

Related Posts

- PackageManagement\Install-Package : No match was found for the specified search criteria and module name

Get-PSGalleryApiAvailability : PowerShell Gallery is currently unavailable. Please try again later.

Comments

Popular posts from this blog

LG TV This app will now restart to free up more memory

LG TV Clear All Browsing History Data

Excel Import CSV not using "Use First Row as Headers"