Install-Module fails with Source Location https://www.powershellgallery.com/api/v2/package/xxx is not valid


The use of Install-Module and Update-Module has become a routine task for many Powershell administrators these days.

Lately if you applied those commands, you may have received warnings and errors even from well-known sources. Messages include:

If you look at the resource or the web site, the package stills exists and can be manually downloaded with a recent browser.

In fact, like many https resource nowadays, the solution lies in the https support in terms of cryptograthy algorithms either on the client or on the server.

Here you will have to add the support for TLS 1.2 for the package to be downloaded, with the following command at the powershell prompt:

And then the operations will resume as usual… Until the next mismatch with the alignment of TLS Support between servers and clients !

Leave a comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.