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 8412073
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:35:05+00:00 2026-06-10T00:35:05+00:00

$source = @{} gci | %{$source.Add($_.FullName,$_)} $source.getEnumerator() | %{($_.value).PsIsContainer} Does not get me anywhere;

  • 0
$source = @{}
gci | %{$source.Add($_.FullName,$_)}
$source.getEnumerator() | %{($_.value).PsIsContainer}

Does not get me anywhere; but

gci | % {$_.PsIsContainer}

Does
I have resorted to using

$source.getEnumerator() | %{
if ((($_.Value).Attributes).toString() -eq "Directory")
   {
   ...
   }

}

Which seems kind of clunky

Why is it that PsIsContainer doesn’t work on HashTable Values?

  • 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-10T00:35:07+00:00Added an answer on June 10, 2026 at 12:35 am

    It does work for me when I use a more direct method of adding items to the table, though:

    PS> $source =@{}
    PS> gci|%{$source[$_.FullName] = $_}
    PS> $source.GetEnumerator() | %{$_.Value.PSIsContainer}
    True
    False
    False
    False
    False
    False
    False
    True
    False
    ...
    

    This seems to be an artifact of using the Add method for putting things in the hashtable.

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

Sidebar

Related Questions

the source is throwing the error: 'nn.asdf' does not contain a definition for 'extension_testmethod'
Source files are good; RPM/DEB are easy to get; apt-get/yum are convenient. But what
All source code hosting services have size limits. I am wondering that does that
source code ... Thing is, if i specify required metadata using fluent modelmetadata provider
What source control products have a diff facility that ignores white space, braces, etc.,
(Citing source at: http://jqueryui.com/demos/dialog/#modal-form ) As an example, this works great but each time
(source: goldprice.org ) Does anyone know of a good ocr that is able to
(source: metrotek.spb.ru ) How to do it with Qt CSS help ? I have
Source Mediawiki markup Right now I'm using a variety of regexes to parse the
Source code of Android Market app is not available. What I want to do

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.