I have recently had my corporate laptop rebuilt and I needed install and update my modules. Upon running the usual command to install my azure modules "install-module AzureRM" I get a error message of "WARNING: Unable to resolve package source 'https://www.powershellgallery.com/api/v2' ". I searched all over google and had a lot of solutions where people discovered that it could be a proxy related problem. For me it wasn't the case as none of them worked for me. I then stumble across an article on Microsoft's website where it appears that Microsoft has deprecated the support for TLS 1.0 and TLS 1.1 as of April 2020 for access to the Powershell Gallery. It also documents the workaround so that you can access the gallery.
Steps I took;
- Run Powershell in admin mode so that you have full permissions.
- Run the following command [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
- Run the commands to install your modules so for me it was install-module AzureRm -force
- Hopefully you will see it update like my one
Here is Microsoft post that provides a bit more detail about the change
No comments:
Post a Comment