Running the following setup:
Trying to install the posh-git module gives:
PowerShellGet\Install-Module posh-git -Scope CurrentUser
But getting
PackageManagement\Install-Package : No match was found for the specified search criteria and module name 'posh-git'.
When trying Get-PackageSource
and Get-PSRepository
I get
WARNING: Unable to find package sources
and
WARNING: Unable to find module repositories.
I'm sitting behind a TMG proxy and tried using the -Proxy
switch and setting setting winttp proxy with no luck.
A per Keith Hill's suggestion, adding the PowerShellGallery repo manually worked:
Register-PSRepository -Name PSGallery -SourceLocation https://www.powershellgallery.com/api/v2
I had trouble getting this working with the -proxy switch, so I set the proxy via netsh which did the trick:
netsh winhttp set proxy proxy-server="http=myproxy:8080"