PowerShell / PowerShell/PSResourceGet

[Find-PSResource]Using wildcard with Repository parameter causes error 'ErrorFilteringNamesForUnsupportedWildcards'

Open
#1,284 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-PSRepository feature_request
Dominant language
C#
Stars
576
Forks
114
Avg merge
1d 2h
Merged PRs (30d)
7

Description

Prerequisites
  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues.
Steps to reproduce

The documentation for Find-PSResource indicates that the Repository parameter accepts wildcards, its use causes an error.

Find-PSResource -Name 'invokebuild'  -Prerelease -Repository '[PS*]'

But the error message quotes the parameter Name :

Find-PSResource : -Name with wildcards '?' and '[' are not supported for this cmdlet so Name entry: [PS*] will be
discarded.
Expected behavior
List all module matching.
Actual behavior
Error 'ErrorFilteringNamesForUnsupportedWildcards'.
Error details
$error[0]|select *


writeErrorStream      : True
PSMessageDetails      :
Exception             : System.Management.Automation.PSInvalidOperationException: -Name with wildcards '?' and '[' are
                        not supported for this cmdlet so Name entry: [PS*] will be discarded.
TargetObject          : Microsoft.PowerShell.PSResourceGet.Cmdlets.FindHelper
CategoryInfo          : InvalidArgument : (Microsoft.Power...lets.FindHelper:FindHelper) [Find-PSResource],
                        PSInvalidOperationException
FullyQualifiedErrorId : ErrorFilteringNamesForUnsupportedWildcards,Microsoft.PowerShell.PSResourceGet.Cmdlets.FindPSRes
                        ource
ErrorDetails          :
InvocationInfo        : System.Management.Automation.InvocationInfo
ScriptStackTrace      : à <ScriptBlock>, <Aucun fichier> : ligne 1
PipelineIterationInfo : {0, 1}
Environment data
#Obsolete comment :"Paste verbatim output from Get-Module PSResourceGet; $PSVersionTable below."


Get-Module Microsoft.PowerShell.PSResourceGet

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Binary     0.5.22     Microsoft.PowerShell.PSResourceGet  {Find-PSResource, Get-InstalledPSResource, Get-PSResourceR...


$PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.19041.3031
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0, 5.0, 5.1.19041.3031}
BuildVersion                   10.0.19041.3031
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
Visuals

image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with Find-PSResource -Name 'invokebuild' -Prerelease -Repository '[PS*]' on the reported PSResourceGet version and compare the error with the expected repository filtering behavior. Trace the Find-PSResource handling associated with ErrorFilteringNamesForUnsupportedWildcards; done means wildcard repository matching works without treating the repository value as a Name entry.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, powershell
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.