Out-GridView Returns!
It’s been almost 3 years since PowerShell Core debuted for Linux and Mac, and as we’ve increased our cmdlet coverage more and more, one cmdlet has always stood out as a top, cross-platform request. Today, we are excited to announce that Out-GridView
is debuting on all Core-supported platforms through the GraphicalTools Module.
Linux | Windows | Mac |
---|---|---|
Installation
If you want to get right to it:
Install-Module Microsoft.PowerShell.GraphicalTools
Features
Out-GridView is a visualization tool to help you deep dive into objects returned from PowerShell.
Piping Get-Process into Out-GridView
Quick Search
Easily locate data points matching a query.
Filters
Display specific data matching only selected filters. Supports common string comparison operators, such as contains, equals, starts with, etc..
DataGrid
Rearrange, sort, and select columns to display. Auto-generates object columns based on the PowerShell format type data, expands PSObject properties if no format definition is available.
PassThru
One of the most powerful features, the -PassThru
parameter lets you use the GUI to select data to send further down the pipeline.
Get-Process | Out-GridView -PassThru | Stop-Process
If you were so inclined the above script uses -PassThru
to create a pretty effective emulation of Windows Task Manger.
Show Code
Sometimes, you need to automate infrequent but complex tasks where filters may be error-prone. Out-GridView
can be used as a filtering tool for these cases to ensure that your filters will produce the output you expect.
Occasionally, you end up needing to repeat this automation and so it would be useful to port your existing Out-GridView
workflow to a script.
Pressing the “Show-Code” button will do this for you. It will generate a PowerShell filtering script that is ready for production.
Using Show Code to find a specific instance of VSCode
Examples of Out-GridView
The Future
We are looking for a community member to help port Show-Command
and Show-Object
. Check out the repository and post in the issue tracking Show-Command
if you’re interested.
With the majority of the brunt work integrating PowerShell & Avalonia done, we are also open to submissions for new graphical commands or packages. A huge thanks to Adam Driscoll for showing the potential of Avalonia + PowerShell with PSAvalonia.
Lastly, check out the great work AvaloniaUI is doing for cross-platform, .NET Core-based GUIs if you haven’t already.
John Zeiders Software Engineering Intern PowerShell Team
This is great news. What a great tool that will be very helpful to many.
$a = Get-ChildItem c:\users | select name, length | Out-GridView -OutputMode Single # doesn’t work: no OK(Export) Cancel buttons (PSVersion: 7.0.0-preview.2).
Out-GridView -InputObject (Get-Process) # It does not work. Any ideas?
Cool. You’re clearly giving what people asked for and were missing from Windows Powershell and this is great!
But I thought there were plans to have “new” text-based out-gridview, like ncurses style, to have it work in remote terminal. Are there plan for it?
That’s really wonderful news! Powershell is not designed to be a GUI-thing, I get it. But this opens oportunity for sysadmins/devops to avoid learinig Qt/Electron/etc in order to create cross-platform GUI interface. Please continue to work on this and just give the posibility to create custom window from custom XAML.