nightroman/SplitPipeline — pull request #2 by MattKotsenas (2013-08-23 02:26:15+00:00)
Title: New parameter Apartment

Hi! I'm a big fan of SplitPipeline. I've added a parameter -Apartment, that is optional and accepts
either 'STA' or 'MTA'. Setting this parameter sets the COM threading apartment model on the
runspaces used by the pipeline. I have to set this value when my pipeline includes creating COM
objects, as some COM objects must be used in an STA or MTA environment. Omitting this parameter
keeps the same behavior as before my change, where the runspace uses the 'Unknown' apartment model.

Please let me know if you have any questions. Thanks!

----- Description of change -----

Add an Apartment parameter that sets STA or MTA on the runspace's initial
session state. Setting the apartment threading model is needed to use COM
objects with thread affinity in the pipeline.