Skip to content

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

Open
@LaurentDardenne

Description

@LaurentDardenne

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions