Hi TaoMa,
> Latterly, I found it can be processed in V1. It seems no one cares this
> feature at all. Maybe this is not a big deal
I think the key point is that you can convert an arbitry script block to
a steppable pipline "object". With this kind of object, you can the call
the begin, process and end method _yourself_ whereas with an ordinary
scriptblock you can only call the "whole thing" at once.
Marco already posted an example:
$sb = {& $wrappedCmdlet @CommandLineParameters | `
where {$_.PSIsContainer} }
$sp = $sb.GetSteppablePipeline()
now you can call begin, process and end on the $sp variable - the
steppable pipeline.
$sp.Begin()
$sp.Process('bla') # call process as often as you want - step by step!
$sp.Process('foo')
#...
$sp.End() #end of story..
Without converting the scriptblock to a steppable pipeline you must call
it as "one big thing":
.. $sp # run the whole script/pipeline/whatever
This is only a guess, however...
cu
Max