I'm having a tough time installing any modules on my new corporate Windows 11 machine. When I try running commands like `Install-Module ExchangeOnlineManagement`, I get a 'no match was found' error. The prompt suggests running `Get-PSRepository`, but that only returns a warning saying 'Unable to find module repositories.' I've already tried using `[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12` to enforce TLS, I'm running PowerShell as an administrator, and I'm not behind a proxy. Any ideas on how to resolve this?
5 Answers
Another thing you could do is delete the file located at `$env:LOCALAPPDATAMicrosoftWindowsPowerShellPowerShellGetPSRepositories.xml`. Then, run `Register-PSRepository -Default` again. It should recreate the file and might resolve the issue.
Check your execution policy by running `Get-ExecutionPolicy` and make sure it’s set to something permissive like `RemoteSigned`. If it's too restrictive, it might prevent installations.
Have you tried running `Register-PSRepository -Default`? After that, check again with `Get-PSRepository` to see if anything changes. Sometimes, this command can help refresh the repositories you're allowed to use.
You could attempt to install modules using `Install-Module -Name -Scope CurrentUser`. If that doesn't work, exporting the module from your Exchange server and installing it manually could be your best bet.
Are you registered with PSGallery? If you can't see it when you run `Get-PSRepository`, try using the repository parameter with your install command that names PSGallery explicitly. Also, check if you can access the module directly via the web.

Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures