Take the 2-minute tour ×  Anybody discovered anyway to make this
happen. I want to have a cmdlet that creates output from a
database. There is no concrete schema, each 'row' can have
different fields. In something like javascript this would be no
problem, each object would have whatever properties it needs;
but powershell isnt like that.  I tried a naive implementation
but all I got was an enumeration of the Key, Value dictionary
that expandos pretend to be.  Expanding the question.  What
object should the get-datarows cmdlet push down the pipe (it
accepts arbitrary queries). I dont know what object types to
instantiate and push. A db query could return a row with
User=dave,Age=12, then another row with User=pete, Favcol = red.
Next time I run the cmdlet a query might return something
totally different (Type=shoe, color=red,use=dancing). Being able
to instantiate a pipe of expandos works perfectly here (except
it doesn't)  My best go so far is to generate a type on the fly
using reflection.emit, but this requ