|
| 1 | +--- |
| 2 | +external help file: ConsoleGuiToolsModule.dll-Help.xml |
| 3 | +keywords: powershell,cmdlet |
| 4 | +locale: en-us |
| 5 | +Module Name: Microsoft.PowerShell.ConsoleGuiTools |
| 6 | +ms.date: 05/01/2026 |
| 7 | +schema: 2.0.0 |
| 8 | +title: Out-ConsoleTableView |
| 9 | +--- |
| 10 | + |
| 11 | +# Out-ConsoleTableView |
| 12 | + |
| 13 | +## SYNOPSIS |
| 14 | + |
| 15 | +Sends output to an interactive table view with column headers, horizontal scrolling, and native multi-selection. |
| 16 | + |
| 17 | +## SYNTAX |
| 18 | + |
| 19 | +```PowerShell |
| 20 | + Out-ConsoleTableView [-InputObject <psobject>] [-Title <string>] [-OutputMode {None | Single | |
| 21 | + Multiple}] [-Filter <string>] [-Search <string>] [-Focus {Table | Filter}] [-MinUI] |
| 22 | + [-FullScreen] [-ForceDriver <string>] [<CommonParameters>] |
| 23 | +``` |
| 24 | + |
| 25 | +## DESCRIPTION |
| 26 | + |
| 27 | +The **Out-ConsoleTableView** cmdlet sends the output from a command to a table view window where the output is displayed in an interactive table with column headers, column sizing, and horizontal scrolling. |
| 28 | + |
| 29 | +Use the Filter box at the top of the window to search the text in the table using regular expressions. Unlike the Filter, the `-Search` parameter positions the cursor on the first matching row without hiding non-matching rows. |
| 30 | + |
| 31 | +Objects are streamed into the table as they arrive from the pipeline — the UI appears immediately and rows are added incrementally. |
| 32 | + |
| 33 | +To send items from the interactive window down the pipeline, select rows (use arrow keys and `SPACE` or click with the mouse) and press `ENTER`. Press `ESC` to cancel without output. Use `Ctrl+A` to select all rows. |
| 34 | + |
| 35 | +## EXAMPLES |
| 36 | + |
| 37 | +### Example 1: Output processes to a table view |
| 38 | + |
| 39 | +```PowerShell |
| 40 | +Get-Process | Out-ConsoleTableView |
| 41 | +``` |
| 42 | + |
| 43 | +This command gets the processes running on the local computer and sends them to a table view window with column headers for each property. |
| 44 | + |
| 45 | +### Example 2: Select a single process using the table view |
| 46 | + |
| 47 | +```PowerShell |
| 48 | +Get-Process | octv -OutputMode Single | Stop-Process |
| 49 | +``` |
| 50 | + |
| 51 | +This command displays processes in a table view restricted to single selection. The selected process is piped to `Stop-Process`. |
| 52 | + |
| 53 | +### Example 3: Filter processes by name on the command line |
| 54 | + |
| 55 | +```PowerShell |
| 56 | +Get-Process | octv -Filter "chrome" |
| 57 | +``` |
| 58 | + |
| 59 | +This command pre-populates the filter box with "chrome", showing only processes whose properties match that regex pattern. |
| 60 | + |
| 61 | +### Example 4: Search for a row without filtering |
| 62 | + |
| 63 | +```PowerShell |
| 64 | +Get-Service | octv -Search "wuauserv" |
| 65 | +``` |
| 66 | + |
| 67 | +This command displays all services but positions the cursor on the first row matching "wuauserv". Unlike `-Filter`, all rows remain visible. |
| 68 | + |
| 69 | +### Example 5: Start with focus on the filter field |
| 70 | + |
| 71 | +```PowerShell |
| 72 | +Get-ChildItem | octv -Focus Filter |
| 73 | +``` |
| 74 | + |
| 75 | +This command opens the table view with the cursor in the filter text field, ready to type a filter immediately. Pressing `ENTER` while in the filter field accepts the currently selected item(s). |
| 76 | + |
| 77 | +### Example 6: Full screen mode with a custom title |
| 78 | + |
| 79 | +```PowerShell |
| 80 | +Get-Process | octv -FullScreen -Title "Process Monitor" |
| 81 | +``` |
| 82 | + |
| 83 | +This command runs the table view in full-screen mode using the alternate screen buffer, with a custom window title. |
| 84 | + |
| 85 | +### Example 7: Minimal UI for scripting |
| 86 | + |
| 87 | +```PowerShell |
| 88 | +Get-Process | octv -MinUI -OutputMode Single |
| 89 | +``` |
| 90 | + |
| 91 | +This command shows the table view with no window frame, filter box, or status bar — just the table. Useful for quick selection in scripts. |
| 92 | + |
| 93 | +### Example 8: Combine Filter and Search |
| 94 | + |
| 95 | +```PowerShell |
| 96 | +Get-Process | octv -Filter "svc" -Search "host" |
| 97 | +``` |
| 98 | + |
| 99 | +This filters to rows matching "svc" and then positions the cursor on the first of those rows matching "host". |
| 100 | + |
| 101 | +## PARAMETERS |
| 102 | + |
| 103 | +### -Filter |
| 104 | +Pre-populates the Filter edit box, hiding rows that do not match the regular expression pattern. |
| 105 | + |
| 106 | +```yaml |
| 107 | +Type: String |
| 108 | +Parameter Sets: (All) |
| 109 | +Aliases: |
| 110 | + |
| 111 | +Required: False |
| 112 | +Position: Named |
| 113 | +Default value: None |
| 114 | +Accept pipeline input: False |
| 115 | +Accept wildcard characters: False |
| 116 | +``` |
| 117 | +
|
| 118 | +### -Search |
| 119 | +Positions the cursor on the first row matching this regular expression pattern. Unlike `-Filter`, non-matching rows remain visible. |
| 120 | + |
| 121 | +```yaml |
| 122 | +Type: String |
| 123 | +Parameter Sets: (All) |
| 124 | +Aliases: |
| 125 | +
|
| 126 | +Required: False |
| 127 | +Position: Named |
| 128 | +Default value: None |
| 129 | +Accept pipeline input: False |
| 130 | +Accept wildcard characters: False |
| 131 | +``` |
| 132 | + |
| 133 | +### -Focus |
| 134 | +Specifies which UI element receives initial focus. |
| 135 | + |
| 136 | +- **Table** (default): The table view receives focus. Use arrow keys to navigate immediately. |
| 137 | +- **Filter**: The filter text field receives focus. Start typing to filter. Press `ENTER` to accept the selected item(s). |
| 138 | + |
| 139 | +```yaml |
| 140 | +Type: FocusTarget |
| 141 | +Parameter Sets: (All) |
| 142 | +Aliases: |
| 143 | +Accepted values: Table, Filter |
| 144 | +
|
| 145 | +Required: False |
| 146 | +Position: Named |
| 147 | +Default value: Table |
| 148 | +Accept pipeline input: False |
| 149 | +Accept wildcard characters: False |
| 150 | +``` |
| 151 | + |
| 152 | +### -InputObject |
| 153 | +Specifies that the cmdlet accepts input for **Out-ConsoleTableView**. |
| 154 | + |
| 155 | +When you use the **InputObject** parameter to send a collection of objects to **Out-ConsoleTableView**, **Out-ConsoleTableView** treats the collection as one collection object, and it displays one row that represents the collection. |
| 156 | + |
| 157 | +To display each object in the collection, use a pipeline operator (|) to send objects to **Out-ConsoleTableView**. |
| 158 | + |
| 159 | +```yaml |
| 160 | +Type: PSObject |
| 161 | +Parameter Sets: (All) |
| 162 | +Aliases: |
| 163 | +
|
| 164 | +Required: False |
| 165 | +Position: Named |
| 166 | +Default value: None |
| 167 | +Accept pipeline input: True (ByValue) |
| 168 | +Accept wildcard characters: False |
| 169 | +``` |
| 170 | + |
| 171 | +### -OutputMode |
| 172 | +Specifies the items that the interactive window sends down the pipeline as input to other commands. |
| 173 | +By default, this cmdlet generates zero, one, or many items. |
| 174 | + |
| 175 | +To send items from the interactive window down the pipeline, select items and press `ENTER`. `ESC` cancels. |
| 176 | + |
| 177 | +The values of this parameter determine how many items you can send down the pipeline. |
| 178 | + |
| 179 | +- None. No items. |
| 180 | +- Single. Zero items or one item. Use this value when the next command can take only one input object. |
| 181 | +- Multiple. Zero, one, or many items. Use this value when the next command can take multiple input objects. This is the default value. |
| 182 | + |
| 183 | +```yaml |
| 184 | +Type: OutputModeOption |
| 185 | +Parameter Sets: OutputMode |
| 186 | +Aliases: |
| 187 | +Accepted values: None, Single, Multiple |
| 188 | +
|
| 189 | +Required: False |
| 190 | +Position: Named |
| 191 | +Default value: Multiple |
| 192 | +Accept pipeline input: False |
| 193 | +Accept wildcard characters: False |
| 194 | +``` |
| 195 | + |
| 196 | +### -Title |
| 197 | +Specifies the text that appears in the title bar of the **Out-ConsoleTableView** window. |
| 198 | + |
| 199 | +By default, the title bar displays "Out-ConsoleTableView". |
| 200 | + |
| 201 | +```yaml |
| 202 | +Type: String |
| 203 | +Parameter Sets: (All) |
| 204 | +Aliases: |
| 205 | +
|
| 206 | +Required: False |
| 207 | +Position: Named |
| 208 | +Default value: Out-ConsoleTableView |
| 209 | +Accept pipeline input: False |
| 210 | +Accept wildcard characters: False |
| 211 | +``` |
| 212 | + |
| 213 | +### -MinUI |
| 214 | +If specified, no window frame, filter box, or status bar will be displayed. The table is shown without chrome. |
| 215 | + |
| 216 | +```yaml |
| 217 | +Type: SwitchParameter |
| 218 | +Parameter Sets: (All) |
| 219 | +Aliases: |
| 220 | +
|
| 221 | +Required: False |
| 222 | +Position: Named |
| 223 | +Default value: None |
| 224 | +Accept pipeline input: False |
| 225 | +Accept wildcard characters: False |
| 226 | +``` |
| 227 | + |
| 228 | +### -FullScreen |
| 229 | +If specified, the application runs in full-screen mode using the alternate screen buffer. By default, the application renders inline in the current terminal. |
| 230 | + |
| 231 | +```yaml |
| 232 | +Type: SwitchParameter |
| 233 | +Parameter Sets: (All) |
| 234 | +Aliases: |
| 235 | +
|
| 236 | +Required: False |
| 237 | +Position: Named |
| 238 | +Default value: None |
| 239 | +Accept pipeline input: False |
| 240 | +Accept wildcard characters: False |
| 241 | +``` |
| 242 | + |
| 243 | +### -ForceDriver |
| 244 | +Forces the Terminal.Gui driver to use. Valid values are `ansi`, `windows`, or `unix`. |
| 245 | + |
| 246 | +```yaml |
| 247 | +Type: String |
| 248 | +Parameter Sets: (All) |
| 249 | +Aliases: |
| 250 | +
|
| 251 | +Required: False |
| 252 | +Position: Named |
| 253 | +Default value: None |
| 254 | +Accept pipeline input: False |
| 255 | +Accept wildcard characters: False |
| 256 | +``` |
| 257 | + |
| 258 | +### CommonParameters |
| 259 | +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). |
| 260 | + |
| 261 | +## INPUTS |
| 262 | + |
| 263 | +### System.Management.Automation.PSObject |
| 264 | + |
| 265 | +You can send any object to this cmdlet. Objects are streamed — the UI appears as soon as the first object arrives. |
| 266 | + |
| 267 | +## OUTPUTS |
| 268 | + |
| 269 | +### System.Object |
| 270 | + |
| 271 | +By default **Out-ConsoleTableView** returns objects representing the selected rows to the pipeline. Use `-OutputMode` to change this behavior. |
| 272 | + |
| 273 | +## NOTES |
| 274 | + |
| 275 | +* **Out-ConsoleTableView** uses Terminal.Gui's `TableView` control which provides column headers, column sizing, horizontal scrolling, and native multi-row selection. |
| 276 | + |
| 277 | +* The alias for **Out-ConsoleTableView** is `octv`. |
| 278 | + |
| 279 | +* Objects are streamed into the table as they arrive from the pipeline. The UI appears immediately on the first object and rows are added incrementally. A spinner in the status bar indicates loading is in progress. |
| 280 | + |
| 281 | +* The command output that you send to **Out-ConsoleTableView** should not be formatted, such as by using the Format-Table or Format-Wide cmdlets. To select properties, use the Select-Object cmdlet. |
| 282 | + |
| 283 | +* Keyboard shortcuts: |
| 284 | + - `ENTER` — Accept selection and close |
| 285 | + - `ESC` — Cancel and close |
| 286 | + - `Ctrl+A` — Select all rows (when OutputMode is Multiple) |
| 287 | + - `Home`/`End` — Jump to first/last row |
| 288 | + - Arrow keys — Navigate rows and columns |
| 289 | + - `Tab` — Move focus between filter and table |
| 290 | + |
| 291 | +## RELATED LINKS |
| 292 | + |
| 293 | +[Out-ConsoleGridView](Out-ConsoleGridView.md) |
0 commit comments