top of page
Tomas Bjerved

PowerShell: Unable to install module

Sometimes you need to install new modules in PowerShell but then you get an error message like this:



Why does this happen and how can we fix this?


The reason is that your PowerShell is not configured to use TLS 1.2, and to fix this you need to activate TLS 1.2 and re-register PSRepository:


register TLS 1.2:

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

Re-register PSGallery:

Unregister-PSRepository -Name PSGallery
Register-PSRepository -Default

Should look like this:

Problem solved!

12 views0 comments

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
bottom of page