Out-GridView: What more can it do?

In the previous post I ran the following line in Windows PowerShell:

Get-Help * | Out-GridView

This took the list of all help topics and created a separate window that looked suspiciously like a nicely formatted spreadsheet. Now, I'm going to investigate how I can interact with the window. Why do I think I can interact with the window?

If I scroll down to the line in the window with the list of help topics (created in the previous post, I told you I would repeat myself alot) that lists the Out-GridView cmdlet, I see the synopsis, a short help description, which says that Out-GridView sends output to an interactive table in a separate window. Here's where I found this in the table I created from the previous post.

I have to ask myself, since the help topic won't talk back to me, what does an interactive table in a separate window mean? Well, I've already seen what the separate window is. That's displayed above. Now, what does interactive table refer to?

I can get an answer to this question by looking at the full version of the Out-GridView cmdlet help topic by typing the following in the Windows PowerShell:

Get-Help Out-GridView –full

When I run this I get a long stream of text that gives me an explanation of what Out-Gridview does in gory detail, all the parameters that it takes, and lots of examples. In the description, I found a nice summary of all the interactive things I can do with the text in the window:

  • Search. I can search over all the text in the window. For example, instead of scrolling down to find the help text for Out-GridView, I could have searched for the Out-GridView cmdlet instead. And this would have been faster than scrolling. 
  • Sort. I can change the ordering of the list based on a column. For example I can reorder the list based on the alphabetical order of the names of help topics.
  • Group. I can group like information together.
  • Filter. I can use the query button to filter information I want or do not want to see.
  • Copy and paste. I can copy rows of information and then paste them into other documents and files.

The help topic for Out-GridView is nice enough to tell me that there isn't any way to format the data before sending it to the window. I take this to mean that the information will be put in the table in whatever order it is output by my commands. But after I've created the new window with the table of information, I'm welcome to munge the data to my heart's content using search, sort, group and filter.

This is all interesting, but pretty general. The help topic includes a nice assortment of examples showing what I can do with my data. I still think pictures help.

So, next time, I'll start working my way through some examples of how to search, sort, group and filter the table in the separate window, but I'll include pictures with my examples.