One of the most interesting features of Powershell is manipulation of data as object collections, which is a feature inherited from the .net platform.
A collection (eg array) can be the result of powershell command and it could contain a lot of objects but only a subset of them could be interesting. To facilitate the selection of data subset, exists a Powershell Cmdlet console-based GUI called Out-ConsoleGridView.
# installation Install-Module Microsoft.PowerShell.ConsoleGuiTools # usage example1: PS C:\> Get-Process | Out-ConsoleGridView
As you can see the tool is always integrated into the terminal because it has built on a cross platform UI toolkit based on a fantastic open source project called Terminal.Gui. Now you can select the objects by using space bar and than confirm the selection with enter.
The result will be:
As you noted the result its still a collection so we can use it by pipe with another Powershell command:
# usage example2: PS C:\> Get-Process | Out-ConsoleGridView | Export-Csv -Path .\ProcessLog.csv
Top comments (0)