Strange "Get-Member" behavior(Title borrowed from Mow's blog)
Ok, it was weird that whenever I was trying to see if a returned value if of a type array or a scalar.
I have been frusted to see foreach or .length property of output to see if the returned value is an array or not.
But I don't think I would have to worry about it no more.
MSH>((get-help get-childitem)."#comment") | gm
would result in displaying type information for type of stored information in the result array object instead of displaying the type of actual array.
But apparently there was at least one another person who was having the similiar problem. Mow
gave me the answer on Usenet newsgroup post
Here is the answer he posted.
MSH>,((get-help get-childitem)."#comment") | gm
Note that, only difference here was that "," is used to before piping the output to "gm".
For more extensive coverage and answer for this behavior, I recommend /\/\o\/\/ on MSH (Monad): Create System Variable From MSH (Part2)
If you read through his blog, there is another way to retrieve type information of the array.
gm -input ((get-help get-childitem)."#comment")
Apparently this latter solution works as well.
for another tip there :)