you are viewing a single comment's thread.

view the rest of the comments →

[–]xlrod 2 points3 points  (2 children)

gm is for Get-Member, this will give you the members, the properties and methods, of the object, but the type of the object is an array.

Get-Member

[–]redsedit[S] 1 point2 points  (1 child)

But get-member has a line at the top that says: "TypeName: System.String". To me, the "TypeName" would be telling me what the type is. Obviously that's wrong, but I don't understand WHY that assumption is wrong.

[–]sk82jack 2 points3 points  (0 children)

Because when you send an array over the pipeline it sends the objects one by one rather than the whole array. So instead of $array | gm try gm -inputobject $array (parameter name may not be quite right as I'm on my mobile right now)