Использовать -Path
(параметр по умолчанию):
Get-ChildItem -Path *-*
Или, если вы ищете в подкаталогах, используйте параметр -Recurse
в сочетании с -Include
.
С Get-Help Get-ChildItem
:
-Include <String[]>
Specifies, as a string array, an item or items that this cmdlet includes in the operation. The value of this
parameter qualifies the Path parameter. Enter a path element or pattern, such as *.txt. Wildcards are
permitted.
The Include parameter is effective only when the command includes the Recurse parameter or the path leads to
the contents of a directory, such as C:\Windows\*, where the wildcard character specifies the contents of the
C:\Windows directory.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false