Out-GridView

Send output to an interactive table in a separate window.

Syntax
      Out-GridView [-InputObject psobject] [-Title string] [CommonParameters]

Key
   -InputObject psobject
       Input object to be displayed

       If a collection of objects are specified, Out-GridView will treat
       the collection as one collection object, and will display one row
       that represents the entire collection.

       To display the each object in a collection, use a pipeline operator (|)
       to send objects to Out-GridView.

    -Title string
       The text that appears in the title bar of the Out-GridView window. 

       By default, the title bar displays the command that invokes Out-GridView.

    -passthru  (PowerShell 3.0)
       Adds an OK/Cancel button to the gridview allowing one or more items to be selected
       and returned back to the pipeline (select multiple items with the Ctrl key.

   CommonParameters:
       -Verbose, -Debug, -ErrorAction, -ErrorVariable, -WarningAction, -WarningVariable,
       -OutBuffer -OutVariable.

Standard Aliases for Out-GridView: ogv

Key features of Grid-View are: Resizable columns, proportionally spaced fonts and the ability to click on a column header to sort the entire grid by that column. Grouping and basic filtering are also available with a right click. To filter a particular column prefix the search with the column name e.g. status:stopped

To run the Out-GridView cmdlet requires .NET Framework 3.0, this should be available by default on Windows Vista or greater but may have to be installed on Win XP.

Examples

Get the processes running on the local computer and sends them to a grid view window:

PS C:\> get-process | out-gridview
or
PS C:\> $p = get-process
PS C:\> $p | out-gridview

Display a formatted table in a grid view window:

PS C:\> get-process | select-object -property name, workingset, peakworkingset | sort-object -property workingset -de sc | out-gridview

“All truth passes through three stages. First, it is ridiculed. Second, it is violently opposed. Third, it is accepted as being self-evident” ~ Arthur Schopenhauer

Related PowerShell Cmdlets:

Out-Default - Send output to default.
Out-Host - Send the pipelined output to the host.
Out-Null - Send output to null.
Out-Printer - Send the output to a printer.
Out-String - Send output to the pipleline as strings.
Tee-Object - Send input objects to two places.
Equivalent bash commands: redirection - Redirection and Process Substitution, cat > file2.txt – Redirect standard input into a file.


 
Copyright © SS64.com 1999-2019
Some rights reserved