Forum Discussion
Reinier SPRUIJT
Jun 11, 2018Brass Contributor
Trying to Install-Module AzureAD but Get-PSRepository "WARNING: Unable to find module repositories."
I am running PSVersion 5.1.16299.431 and have set my proxy using NetSH WinHTTP Set Proxy proxy-server="my.proxy.server" I would like to "Install the preview version of the Azure Active Directory ...
- 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
MrPoolee
Feb 24, 2022Copper Contributor
For me, I eventually found that the Execution Policy was set to Restrict. I changed this to Bypass (Set-ExecutionPolicy Bypass), then was able to see that the see the repository (Get-PSRepository).
Then I just had to trust the PSGallery (Set-PSRepository -Name "PSGallery" -InstallationPolicy Trusted).
After that, I had no further problems.