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'
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
Resolution
To resolve this issue, I set the SecurityProtocol to Tls12 by running this command in PowerShell:
[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.
Related Posts
- Get-PSGalleryApiAvailability : PowerShell Gallery is currently unavailable. Please try again later.
Comments
Post a Comment