In what conditions does powershell unroll items in the pipeline?
Consider the following: function OutputArray{ $l = @(,(10,20)) $l } (OutputArray) -is [collections.ienumerable] # C:\ PS> True (OutputArray).Count # C:\ PS> 2 $l is "unrolled" when it enters the pipeline . This answer states that powershell unrolls all collections . A hashtable is a collection . However, a hashtable is of course unaffected by the pipeline: function OutputHashtable{ $h = @{nested=@{prop1=10;prop2=20}} $h } (OutputHashtable) -is [collections.ienumerable] # C:\ PS> True (OutputHashtable).Count # C:\ PS> 1 This comment suggests that it is all IEnumerable that are converted to