PackageManagement\Install-Package : No match was found for the specified search criteria and module name

This post describes how to fix the error PackageManagement\Install-Package : No match was found for the specified search criteria and module name 'AzureRM', 'nuget', 'azuread', 'msonline', 'vmware.powercli', sqlserver' and more.

Screenshot showing error PackageManagement\Install-Package : No match was found for the specified search criteria and module name

Cause

This error can occur when trying to install packages/modules if the account being used does not have any repositories configured.  You can check this by running:

Get-PSRepository

Note: I had to install PowerShell v5 from Windows Management Framework 5 (WMF 5) for Get-PSRepository to work.  Please read this post if PowerShell does not open on Windows Server 2008 R2 after installing WMF 5.

Screenshot showing Get-PSRepository warning unable to find module repositories

Resolution

If the PowerShell Gallery (PSGallery) repository is not installed, either logon as another user who has this repository installed, or restore it by running (ensure you have an internet connection):

Register-PSRepository -Default

Screenshot showing PSGallery restored

If this fails, please see my other post No match was found for the specified search criteria for the provider 'NuGet'

If this succeeds, you should now be able to install packages/modules.

Comments

  1. I have PSGallery installed but still getting the "No match..." error.
    There must be more to it. Thanks for trying, anyway.

    ReplyDelete
    Replies
    1. Thanks for letting me know. Please do post back if you find a solution that works for you.

      Delete

Post a Comment

Popular posts from this blog

LG TV This app will now restart to free up more memory

LG TV Clear All Browsing History Data

Excel Import CSV not using "Use First Row as Headers"