Description:
You try to Install a new PowerShell Module. But you got an error saying "No match was found for the specified search criteria and module name ' ' Try Get-PSRepository to see all available registered module repositories". However when you try to run Get-PSRepository command you got "Unable to find module repositories error".
You have try the following, but still have the problem:
- Make sure to Run as Administrator,
- Make sure to use TLS 1.2
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
- Unregister and Register
- Unregister-PSRepository -Name PSGallery
- Register-PSRepository -Default