Link to home
Create AccountLog in
Avatar of Wizard_Microsystems

asked on

Collection Type Most Appropriate for PowerShell Output

What would be the best Collection-type or Interface to use for capturing PowerShell script output?  

This small piece of code is my best attempt so far.  I know there is lots missing.

Collection<PSObject> results = pipeline.Invoke();

What would be the correct assembly, the correct initiation of the instance, etc.?  What supporting code do I need to have around this?  Where does PSObject come from?  Does it have to be initialized or is it a generic type?  I am more interested in the left side of the statement.  I think I have a handle on the right side.  Is it incorrect to do both the left side and the right simultaneously?  Thanks in advance.
Avatar of topdog770
Flag of United States of America image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Chris Dent
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.