Forum Discussion
Trying to Install-Module AzureAD but Get-PSRepository "WARNING: Unable to find module repositories."
- Jun 18, 2020
I followed https://dev.to/darksmile92/powershell-disabled-support-for-tls-1-0-for-the-gallery-update-module-and-install-module-broken-1oii, and the "Microsoft way" didn't work. I needed to execute the second block of commands:
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12 Register-PSRepository -Default -Verbose Set-PSRepository -Name "PSGallery" -InstallationPolicy Trusted
Thank you for the tip Thomas Lee, when I run Get-Module -Name PowerShellGet -ListAvailable | Install-Module I get output:
PackageManagement\Install-Package : No match was found for the specified search criteria and module name 'PowerShellGet'. Try Get-PSRepository to see all available registered module repositories.
Is this expected given that the get-module -ListAvailable match for PowerShellGet did list a path in C:\Program Files\WindowsPowerShell? Also, it part of the issue that get-module and get-psrepository don't have parameters to set a proxy? As I mentioned before, I did have set my proxy using NetSH WinHTTP Set Proxy proxy-server="my.proxy.server".
I'm running out of options running with this network configuration, as the proxy seems to be the issue. I have managed to install the module on another device outside the network.
Whoops - my bad - a typo in my suggestion.
Instead of Get-Module -list, it should have been Find-Module PowerShellGet | Install-module