powershellpowershell-2.0out-gridview

Out-GridView with Passthru for powershell 2?


Powershell v3 added the -Passthru switch to the Out-GridView cmdlet that allows user to select items that are returned back to the pipeline.

I'm looking for a similar solution for Powershell v2 (Dotnet 3.5/4.0). I need the option to pipe in some values, allow user to filter and choose multiple values, and return the selected items to the pipeline.

Is there a way run the new Out-GridView throught dotnet? or maybe someone created a code for something similar?


Solution

  • I've got this, FWIW:

    Select -Item

    Not a real grid view, but it works for V2, and in remoting sessions where GridView isn't an option.