How to stop PowerShell from unpacking an Enumerable object?
Posted
by spoon16
on Stack Overflow
See other posts from Stack Overflow
or by spoon16
Published on 2010-05-03T04:57:24Z
Indexed on
2010/05/03
6:08 UTC
Read the original article
Hit count: 335
powershell
Working on a simple helper function in PowerShell that takes a couple of parameters and creates a custom Enumerable object and outputs that object to the pipeline. The problem I am having is that PowerShell is always outputting a System.Array that contains the objects that are enumerated by my custom Enumerable object. How can I keep PowerShell from unpacking the Enumerable object?
The code: http://gist.github.com/387768
© Stack Overflow or respective owner