Fix: Install-Module: PackageManagement\Install-Package : No match was found for the specified search criteria and module name Error
Problem: When trying to install a new module using: Install-Module <Module-Name>, getting this error message:
“PackageManagement\Install-Package : No match was found for the specified search criteria and module name ‘ExchangeOnlineManagement.’. Try Get-PSRepository to see all available registered module repositories.”
Solution:
Here is the troubleshooting checklist:
- It could be due to a typo in the module name (E.g., the “dot” at the end of the module name, in my case!). The right module name resolved the issue. Try Find-module *Module-Name* to check all available modules. E.g., Find-module *Exchange*
- Try setting the TLS1.2 for the .net Security protocol using: [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
- Type: Get-PSRepository, If you get any error, Try running: Register-PSRepository -Default
- Try Re-installing the PowerShellGet module using: Install-Module -Name PowerShellGet -Force
- Try using the “-scope” attribute. E.g. Install-Module -Name ExchangeOnlineManagement -Scope CurrentUser