where does .count come from?

Welcome Forums General PowerShell Q&A where does .count come from?

This topic contains 1 reply, has 2 voices, and was last updated by

1 year, 11 months ago.

  • Author
  • #69097

    Points: 0
    Rank: Member

    Okay, if I do a (dir *.dll).count in a folder (say system32). I get the number of dll files in that folder. But if I do a (dir *.dll) | gm
    Well, I don't see count listed in the output. So where does it come from, and what other ones are there?

    (add: Never mind, I found it in the about_properties file, under PROPERTIES OF SCALAR OBJECTS AND COLLECTIONS.)

  • #69373

    Points: 1,811
    Helping HandTeam Member
    Rank: Community Hero

    The commands produce a collection of objects. Get-Member normally shows you the members of what's _inside_ the collection, rather than the collection itself, which is where the Count property comes from.

The topic ‘where does .count come from?’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort