- Active Directory
- Internet Explorer
- News About Tome
- Regular Expressions
IT Notes from the Powertoe – Tome Tanasovski
So, with so much to talk about, I’m going to show something simple that I think is madly madly cool! Out-GridView now has a PassThru parameter. What does it mean, what does it mean?
Try the following:
Get-Process |Out-GridView -PassThru |Select Name
You’ll see your normal Out-GridView, but you’ll also see an OK and Cancel button int he bottom right.
What does it mean?
Filter the contents of the gridview to display things you are interested in, then click on a few rows. When you have selected a few, click OK! You have just passed the objects that you are interested in through the pipeline to the next cmdet which happens to be Select Name. What an amazing cmdlet! The ability to have the operator of your script use the filtering and sorting of Out-GridView to choose data that should be processed!