{"id":17949,"date":"2019-08-14T12:37:16","date_gmt":"2019-08-14T20:37:16","guid":{"rendered":"http:\/\/devblogs.microsoft.com\/powershell\/?p=17949"},"modified":"2019-11-18T19:02:44","modified_gmt":"2019-11-19T03:02:44","slug":"out-gridview-returns","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/powershell\/out-gridview-returns\/","title":{"rendered":"Out-GridView Returns"},"content":{"rendered":"<div class=\"markdown-body\">\n<h2><a id=\"user-content-out-gridview-returns\" class=\"anchor\" href=\"#out-gridview-returns\" aria-hidden=\"true\"><\/a>Out-GridView Returns!<\/h2>\n<p>It&#8217;s been almost 3 years since PowerShell Core debuted for Linux and Mac, and as we&#8217;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 <code>Out-GridView<\/code> is debuting on all Core-supported platforms through the <a href=\"https:\/\/github.com\/powershell\/GraphicalTools\">GraphicalTools Module<\/a>.<\/p>\n<table>\n<thead>\n<tr>\n<th>Linux<\/th>\n<th>Windows<\/th>\n<th>Mac<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><a href=\"https:\/\/camo.githubusercontent.com\/e04c23b41bd33c5423bfffe83758fd3359dd4094\/68747470733a2f2f706f7765727368656c6c2e6769746875622e696f2f506f7765725368656c6c2d426c6f672f496d616765732f323031392d30382d31332d4f757447726964566965772d52657475726e732f4f757447726964566965774c696e75782e676966\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" style=\"max-width: 100%;\" src=\"https:\/\/camo.githubusercontent.com\/e04c23b41bd33c5423bfffe83758fd3359dd4094\/68747470733a2f2f706f7765727368656c6c2e6769746875622e696f2f506f7765725368656c6c2d426c6f672f496d616765732f323031392d30382d31332d4f757447726964566965772d52657475726e732f4f757447726964566965774c696e75782e676966\" alt=\"linux-gif\" data-canonical-src=\"https:\/\/powershell.github.io\/PowerShell-Blog\/Images\/2019-08-13-OutGridView-Returns\/OutGridViewLinux.gif\" \/><\/a><\/td>\n<td><a href=\"https:\/\/camo.githubusercontent.com\/d0e7ef055ea21713d1424de6674d553a64553f43\/68747470733a2f2f706f7765727368656c6c2e6769746875622e696f2f506f7765725368656c6c2d426c6f672f496d616765732f323031392d30382d31332d4f757447726964566965772d52657475726e732f4f7574477269645669657757696e646f77732e676966\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" style=\"max-width: 100%;\" src=\"https:\/\/camo.githubusercontent.com\/d0e7ef055ea21713d1424de6674d553a64553f43\/68747470733a2f2f706f7765727368656c6c2e6769746875622e696f2f506f7765725368656c6c2d426c6f672f496d616765732f323031392d30382d31332d4f757447726964566965772d52657475726e732f4f7574477269645669657757696e646f77732e676966\" alt=\"window-gif\" data-canonical-src=\"https:\/\/powershell.github.io\/PowerShell-Blog\/Images\/2019-08-13-OutGridView-Returns\/OutGridViewWindows.gif\" \/><\/a><\/td>\n<td><a href=\"https:\/\/camo.githubusercontent.com\/23f4331d1f9bb8ed116ed3e87d8ff0a2a16b6848\/68747470733a2f2f706f7765727368656c6c2e6769746875622e696f2f506f7765725368656c6c2d426c6f672f496d616765732f323031392d30382d31332d4f757447726964566965772d52657475726e732f4f757447726964566965774d61632e676966\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" style=\"max-width: 100%;\" src=\"https:\/\/camo.githubusercontent.com\/23f4331d1f9bb8ed116ed3e87d8ff0a2a16b6848\/68747470733a2f2f706f7765727368656c6c2e6769746875622e696f2f506f7765725368656c6c2d426c6f672f496d616765732f323031392d30382d31332d4f757447726964566965772d52657475726e732f4f757447726964566965774d61632e676966\" alt=\"macos-gif\" data-canonical-src=\"https:\/\/powershell.github.io\/PowerShell-Blog\/Images\/2019-08-13-OutGridView-Returns\/OutGridViewMac.gif\" \/><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><a id=\"user-content-installation\" class=\"anchor\" href=\"#installation\" aria-hidden=\"true\"><\/a>Installation<\/h2>\n<p>If you want to get right to it:<\/p>\n<div class=\"highlight highlight-source-powershell\">\n<pre class=\"\">Install-Module Microsoft.PowerShell.GraphicalTools<\/pre>\n<\/div>\n<h2><a id=\"user-content-features\" class=\"anchor\" href=\"#features\" aria-hidden=\"true\"><\/a>Features<\/h2>\n<p>Out-GridView is a visualization tool to help you deep dive into objects returned from PowerShell.<\/p>\n<p><a href=\"https:\/\/camo.githubusercontent.com\/7567037494cb38307400e1bc1e68271be5d0a136\/68747470733a2f2f706f7765727368656c6c2e6769746875622e696f2f506f7765725368656c6c2d426c6f672f496d616765732f323031392d30382d31332d4f757447726964566965772d52657475726e732f4f75744772696456696577496d6167652e706e67\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" style=\"max-width: 100%;\" src=\"https:\/\/camo.githubusercontent.com\/7567037494cb38307400e1bc1e68271be5d0a136\/68747470733a2f2f706f7765727368656c6c2e6769746875622e696f2f506f7765725368656c6c2d426c6f672f496d616765732f323031392d30382d31332d4f757447726964566965772d52657475726e732f4f75744772696456696577496d6167652e706e67\" alt=\"Out-GridViewImage\" data-canonical-src=\"https:\/\/powershell.github.io\/PowerShell-Blog\/Images\/2019-08-13-OutGridView-Returns\/OutGridViewImage.png\" \/><\/a> <em>Piping Get-Process into Out-GridView<\/em><\/p>\n<h3><a id=\"user-content-quick-search\" class=\"anchor\" href=\"#quick-search\" aria-hidden=\"true\"><\/a>Quick Search<\/h3>\n<p>Easily locate data points matching a query.<\/p>\n<h3><a id=\"user-content-filters\" class=\"anchor\" href=\"#filters\" aria-hidden=\"true\"><\/a>Filters<\/h3>\n<p>Display specific data matching only selected filters. Supports common string comparison operators, such as contains, equals, starts with, etc..<\/p>\n<h3><a id=\"user-content-datagrid\" class=\"anchor\" href=\"#datagrid\" aria-hidden=\"true\"><\/a>DataGrid<\/h3>\n<p>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.<\/p>\n<h3><a id=\"user-content-passthru\" class=\"anchor\" href=\"#passthru\" aria-hidden=\"true\"><\/a>PassThru<\/h3>\n<p>One of the most powerful features, the <code>-PassThru<\/code> parameter lets you use the GUI to select data to send further down the pipeline.<\/p>\n<div class=\"highlight highlight-source-powershell\">\n<pre>Get-Process | Out-GridView -PassThru | Stop-Process<\/pre>\n<\/div>\n<p>If you were so inclined the above script uses <code>-PassThru<\/code> to create a pretty effective emulation of Windows Task Manger.<\/p>\n<h3><a id=\"user-content-show-code\" class=\"anchor\" href=\"#show-code\" aria-hidden=\"true\"><\/a>Show Code<\/h3>\n<p>Sometimes, you need to automate infrequent but complex tasks where filters may be error-prone. <code>Out-GridView<\/code> can be used as a filtering tool for these cases to ensure that your filters will produce the output you expect.<\/p>\n<p>Occasionally, you end up needing to repeat this automation and so it would be useful to port your existing <code>Out-GridView<\/code> workflow to a script.<\/p>\n<p>Pressing the &#8220;Show-Code&#8221; button will do this for you. It will generate a PowerShell filtering script that is ready for production.<\/p>\n<p><a href=\"https:\/\/camo.githubusercontent.com\/373265f17e6b64eb588e5f083e5c8aac14634696\/68747470733a2f2f706f7765727368656c6c2e6769746875622e696f2f506f7765725368656c6c2d426c6f672f496d616765732f323031392d30382d31332d4f757447726964566965772d52657475726e732f4f7574477269645669657753686f77436f64652e706e67\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><img decoding=\"async\" style=\"max-width: 100%;\" src=\"https:\/\/camo.githubusercontent.com\/373265f17e6b64eb588e5f083e5c8aac14634696\/68747470733a2f2f706f7765727368656c6c2e6769746875622e696f2f506f7765725368656c6c2d426c6f672f496d616765732f323031392d30382d31332d4f757447726964566965772d52657475726e732f4f7574477269645669657753686f77436f64652e706e67\" alt=\"Out-GridViewImage\" data-canonical-src=\"https:\/\/powershell.github.io\/PowerShell-Blog\/Images\/2019-08-13-OutGridView-Returns\/OutGridViewShowCode.png\" \/><\/a> <em>Using Show Code to find a specific instance of VSCode<\/em><\/p>\n<h2><a id=\"user-content-examples-of-out-gridview\" class=\"anchor\" href=\"#examples-of-out-gridview\" aria-hidden=\"true\"><\/a>Examples of Out-GridView<\/h2>\n<ul>\n<li><a href=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/4305\/what-powershell-script-was-i-working-on\/\" rel=\"nofollow\">Find a recent script<\/a><\/li>\n<li><a href=\"https:\/\/mikefrobbins.com\/2014\/09\/11\/creating-a-simplistic-gui-interface-with-out-gridview\/\" rel=\"nofollow\">Simple GUI Interface<\/a><\/li>\n<li><a href=\"https:\/\/voiceofthedba.com\/2017\/01\/18\/using-out-gridview-to-pick-parameters-sqlnewblogger\/\" rel=\"nofollow\">Pick a database to connect to<\/a><\/li>\n<\/ul>\n<h2><a id=\"user-content-the-future\" class=\"anchor\" href=\"#the-future\" aria-hidden=\"true\"><\/a>The Future<\/h2>\n<p>We are looking for a community member to help port <a href=\"https:\/\/docs.microsoft.com\/en-us\/powershell\/module\/microsoft.powershell.utility\/show-command?view=powershell-5.1\" rel=\"nofollow\"><code>Show-Command<\/code><\/a> and <a href=\"http:\/\/powershellcookbook.com\/recipe\/bpqU\/program-interactively-view-and-explore-objects\" rel=\"nofollow\"><code>Show-Object<\/code><\/a>. Check out the <a href=\"https:\/\/github.com\/Powershell\/GraphicalTools\">repository<\/a> and post in the <a href=\"https:\/\/github.com\/PowerShell\/GraphicalTools\/issues\/15\">issue tracking <code>Show-Command<\/code><\/a> if you&#8217;re interested.<\/p>\n<p>With the majority of the brunt work integrating PowerShell &amp; 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 <a href=\"https:\/\/github.com\/ironmansoftware\/psavalonia\">PSAvalonia<\/a>.<\/p>\n<p>Lastly, check out the great work <a href=\"http:\/\/avaloniaui.net\/\" rel=\"nofollow\">AvaloniaUI<\/a> is doing for cross-platform, .NET Core-based GUIs if you haven&#8217;t already.<\/p>\n<hr \/>\n<p>John Zeiders\nSoftware Engineering Intern\nPowerShell Team<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Out-GridView Returns! It&#8217;s been almost 3 years since PowerShell Core debuted for Linux and Mac, and as we&#8217;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 [&hellip;]<\/p>\n","protected":false},"author":6844,"featured_media":13641,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-17949","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell"],"acf":[],"blog_post_summary":"<p>Out-GridView Returns! It&#8217;s been almost 3 years since PowerShell Core debuted for Linux and Mac, and as we&#8217;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 [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/17949","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/users\/6844"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/comments?post=17949"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/17949\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media\/13641"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media?parent=17949"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/categories?post=17949"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/tags?post=17949"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}