Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8675613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T19:59:31+00:00 2026-06-12T19:59:31+00:00

Situation: Get-ChildItem $Path -Filter *.dll works for me This works: $Path = $env:windir\system32\* $GuyArray

  • 0

Situation:

  1. Get-ChildItem $Path -Filter *.dll works for me

  2. This works:

    $Path = "$env:windir\system32\*"
    $GuyArray = @("*.dll", "*.exe")
    
    Get-ChildItem $Path -Include $GuyArray
    
  3. But I cannot get this working:

    $Path = "$env:windir\system32\*"
    $GuyArray = @("*.dll", "*.exe")
    
    Get-ChildItem $Path -Filter $GuyArray
    

Error message:

Cannot convert ‘System.Object[]’ to the type ‘System.String’ required by parameter ‘Filter’. Specified method is not supported.

Questions:

  1. Does this mean that -Include supports multiple values, but -Filter only allows one value?
  2. If the above explaination is correct, is there a way I could have discovered this from Get-Help gci?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T19:59:33+00:00Added an answer on June 12, 2026 at 7:59 pm

    Does this mean that -Include supports multiple values, but -Filter only allows one value?

    Yes.

    If the above explaination is correct, is there a way I could have discovered this from Get-Help gci?

    Yes, but you do not get much information by Get-Help gci -Parameter Filter. But you still can see it is a string, not an array. As for the details, Filter is a provider-specific filter. Get-Help gci cannot tell you anything about implementation in a particular provider. In theory, Get-Help FileSystem (help about this provider) should have explained this.

    P.S. Also note that this filter rather uses CMD wildcard rules than PowerShell wilcard rules.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have situation like this: class IData { virtual void get() = 0; virtual
How can I get java classes from an xml file? In this situation, I
I see that many people get this error, but their situations all appear a
i'm in a situation where i need to get boost::thread::id into a variable, but
let's get some different points of view about this situation I have. I'm creating
I have this situation where I need to get some data from a webpage
I often get into situation when I'd like to use template method pattern, but
I usually get so confused with UML and this situation is no different. Let's
In this situation how would I get the setting to keep the hovered state
I have this situation: public class busOrder: IbusOrder { public Order vOrder { get;

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.