CmdID / PowerShell / Cmdlets / Out
Out-GridView
Sends output to an interactive table in a separate window. PowerShell reference
From the PowerShell reference
5 parameters
Alias ogv
What it does
Sends output to an interactive table in a separate window. The Out-GridView cmdlet sends the output from a command to a grid view window where the output is displayed in an interactive table. Because this cmdlet requires a user interface, it does not work on Windows Server Core or Windows Nano Server. You can use the following features of the table to examine your data: - Hide, show, and reorder columns - Sort rows - Quick filter - Add criteria filter - Copy and paste For full instructions, see the Notes section of this article.
Out-GridView [-InputObject <PSObject>] [-Title <String>] [-PassThru] [<CommonParameters>]Out-GridView [-InputObject <PSObject>] [-Title <String>] [-Wait] [<CommonParameters>]Out-GridView [-InputObject <PSObject>] [-Title <String>] [-OutputMode <OutputModeOption>] [<CommonParameters>]
Output processes to a grid view
Get-Process | Out-GridViewIdentifyUse a variable to output processes to a grid view
$P = Get-Process
$P | Out-GridViewIdentifyDisplay a selected properties in a grid view
Get-Process | Select-Object -Property Name, WorkingSet, PeakWorkingSet |
Sort-Object -Property WorkingSet -Descending | Out-GridViewIdentifySave output to a variable, and then output a grid view
($A = Get-ChildItem -Path $PSHOME -Recurse) | Out-GridViewIdentifyOutput processes for a specified computer to a grid view
Get-Process -ComputerName "Server01" | ogv -Title "Processes - Server01"IdentifyOutput data from remote computers to a grid view
Invoke-Command -ComputerName S1, S2, S3 -ScriptBlock {Get-Culture} | Out-GridViewIdentifyPass multiple items through Out-GridView
Get-Process | Out-GridView -PassThru | Export-Csv -Path .\ProcessLog.csvIdentifyCreate a Windows shortcut to Out-GridView
pwsh -Command "Get-Service | Out-GridView -Wait"IdentifyIts page in the reference: Out-GridView.
Parameters
-InputObjectSpecifies object that the cmdlet accepts as input for Out-GridView.
When you use the InputObject parameter to send a collection of objects to Out-GridView,
Out-GridView treats the collection as one collection object, and it displays one row that
represents the collection. To display the each object in the collection, use a pipeline operator
(|) to send objects to Out-GridView.-OutputModeSpecifies the items that the interactive window sends down the pipeline as input to other commands. By default, this cmdlet does not generate any output. To send items from the interactive window down the pipeline, click to select the items and then click OK.
The values of this parameter determine how many items you can send down the pipeline.
- None. No items. This is the default value.
- Single. Zero items or one item. Use this value when the next command can take only one input
object.
- Multiple. Zero, one, or many items. Use this value when the next command can take multiple input
objects. This value is equivalent to the PassThru parameter.
This parameter was introduced in Windows PowerShell 3.0.-PassThruIndicates that the cmdlet sends items from the interactive window down the pipeline as input to other commands. By default, this cmdlet does not generate any output. This parameter is equivalent to using the Multiple value of the OutputMode parameter.
To send items from the interactive window down the pipeline, click to select the items and then click OK. Shift-click and Ctrl-click are supported.-TitleSpecifies 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.-WaitIndicates that the cmdlet suppresses the command prompt and prevents Windows PowerShell from closing
until the Out-GridView window is closed. By default, the command prompt returns when the
Out-GridView window opens.
This feature lets you use the Out-GridView cmdlets in Windows shortcuts. When Out-GridView is used in a shortcut without the Wait parameter, the Out-GridView window appears only momentarily before PowerShell closes.