where does .count come from?

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by  Don Jones 5 months ago.

  • Author
    Posts
  • #69097

    Richard Lyon
    Participant

    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

    Don Jones
    Keymaster

    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.

You must be logged in to reply to this topic.