状況:
Get-ChildItem $Path -Filter *.dll
私のために働くこれは機能します:
$Path = "$env:windir\system32\*" $GuyArray = @("*.dll", "*.exe") Get-ChildItem $Path -Include $GuyArray
しかし、私はこれを機能させることができません:
$Path = "$env:windir\system32\*" $GuyArray = @("*.dll", "*.exe") Get-ChildItem $Path -Filter $GuyArray
エラーメッセージ:
'System.Object[]'をパラメーター'Filter'に必要なタイプ'System.String'に変換できません。指定された方法はサポートされていません。
質問:
-Include
これは、複数の値をサポートしているが、-Filter
1つの値しか許可していないことを意味しますか?- 上記の説明が正しければ、これを発見する方法はあり
Get-Help gci
ますか?