Powershell find-package -name fails

2022-01-25T18:26:22.393+00:00

Using:
Find-Package -Source src
works in my system, but when I add a name from that list, it fails to find the package. So, the failing command is:
Find-Package -Source src -Name name
The first returns a list of the packages in that source location, and the second gets this error:
Find-Package: No match was found for the specified search criteria and package name 'name'. Try Get-PackageSource to see all available registered package sources.
Get-PackageSource returns a list that includes the source I am using.

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,403 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 39,416 Reputation points
    2022-01-26T14:46:19.187+00:00

    Hello @Cameron Saint George (Game Seven Staffing, LLC)

    Usually it should not be of any problem, but in some cases if you are using a package that is not part of the PS Gallery, the you'll need to Get and Register first:

    Get-PackageSource  
    

    and then

    Register-PackageSource -provider <provider> -name <name> -location <URLlocation>  
    

    It would help if you have any specific case for the community to test or repro.

    Hope this helps with your query,

    ------------

    --If the reply is helpful, please Upvote and Accept as answer--

    0 comments No comments