Always Upgrading Blog

A blog (mostly) about Enterprise IT upgrades.

Unable to Resolve Package Source Powershell

Error Message

I came across the following error when trying to install the VMware PowerCLI tools today, which appears to be related to requiring TLS 1.2 now.

PS C:\windows\system32> Install-Module VMware.PowerCLI
WARNING: Unable to resolve package source ''.
PackageManagement\Install-Package : No match was found for the specified search criteria and module name 'VMware.PowerCLI'. Try Get-PSRepository to see all available registered module 
At C:\Program Files (x86)\WindowsPowerShell\Modules\PowerShellGet\\PSModule.psm1:1772 char:21
+ ...          $null = PackageManagement\Install-Package @PSBoundParameters
+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Exception
    + FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

Thankfully the fix is nice and straight forward, simply open a new Powershell window as an Administrator and run the following command:

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