rmbolger / Posh-IBWAPI

PowerShell module for interacting with the Infoblox WAPI (REST API).
MIT License
54 stars 8 forks source link

Install-Module is not working, do you have a solution or workaround ? #48

Closed MKastuv closed 4 years ago

MKastuv commented 4 years ago

Here is my error:

PackageManagement\Install-Package : Package 'Posh-IBWAPI' failed to download.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809 char:21
+ ...          $null = PackageManagement\Install-Package @PSBoundParameters
+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (C:\Users\703430...sh-IBWAPI.nupkg:String) [Install-Package], Exception
    + FullyQualifiedErrorId : PackageFailedInstallOrDownload,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage
MKastuv commented 4 years ago

I need to restart my laptop ... I dont know why. Thanks !

rmbolger commented 4 years ago

This may also have to do with the recent change MS made on PowerShell Gallery to disable old TLS protocols.

Unless you've made some .NET related registry changes to enable newer encryption support, PowerShell defaults to only having TLS 1.0 and 1.1 available. So you have to run this to get it to use TLS 1.2 which is the only thing PowerShell Gallery now supports. I should also probably add this to the readme.

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