Install-Package : No match was found for the specified search criteria
Issue
When attempting to install a module using Windows PowerShell using the Install-Module cmdlet as an Administrator you see the error
PackageManagement\Install-Package : No match was found for the specified search criteria and module name 'module name'.
Try Get-PSRepository to see all available registered module repositories.
Cause
This error can be seen if the default PSGallery PowerShell repository is not correctly registered.
Resolution
- Start Windows PowerShell as an Administrator
- Restore the default repository by executing the Register-PSRepository cmdlet.
Register-PSRepository -Default - Ensure the default repository is installed with the Get-PSRepository cmdlet.
Get-PSRepository
More Information
If the repository is not restored ensure the system is configured to use TLS version 12.
For more information see the Unable to download the list of available providers section.