简体   繁体   中英

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM