Search notes:

PowerShell: wildcards

Wildcards are used to select strings (or «items») that meet a certain pattern.
The list of possible wildcards is
* Zero, one or more characters
? Exactly one character
[fqR] Matches one character if is is either f, q or R.
[a-f] Maches one character if is in the range of a through f.
Wildcards can be used, for example, in
Wildcards are way less powerfull than regular expressions which can be specified with the -match, -nomatch and -replace operators.

No default expansion in most commands

Note that PowerShell won't expand wildcards when invoking a command as one might be used from other shells. The following command wll print the literal string *.ps1, regardless if there are any PowerShell scripts in the current directory:
write-output *.ps1
There are, however, a few comannds that do expand wild cards.
These commands can be forced to not expand wildcards by using the -literalPath option, for example in the cmdlet remove-item.

See also

The supportsWildcards attributes for parameters.
The supportsWildcards attribute of a function parameter.

Index