{"id":6871,"date":"2007-12-17T16:03:28","date_gmt":"2007-12-17T16:03:28","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/powershell\/2007\/12\/17\/out-gridview\/"},"modified":"2019-02-18T13:16:19","modified_gmt":"2019-02-18T20:16:19","slug":"out-gridview","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/powershell\/out-gridview\/","title":{"rendered":"out-gridview"},"content":{"rendered":"<p>One of the new feature areas for PowerShell V2 CTP is support for rich output.&#160; The <b><i>out-gridview<\/i><\/b> cmdlet allows you to send the output of any PowerShell command into a fully interactive grid window.&#160; This feature is available from standard PowerShell and Graphical PowerShell.&#160; Out-GridView can be very useful if the output of your command is long or you need to perform a deeper analysis on that data.&#160; <\/p>\n<p>Here is an example of how to use the out-gridview to display the running processes.&#160; Out-GridView also supports the following aliases <b>grid<\/b> and <b>ogv<\/b><\/p>\n<p><a href=\"https:\/\/msdnshared.blob.core.windows.net\/media\/TNBlogsFS\/BlogFileStorage\/blogs_msdn\/powershell\/WindowsLiveWriter\/outgridview_A5D1\/clip_image002%5B4%5D_2.jpg\"><img decoding=\"async\" style=\"border-top-width: 0px;border-left-width: 0px;border-bottom-width: 0px;border-right-width: 0px\" height=\"106\" alt=\"clip_image002[4]\" src=\"https:\/\/msdnshared.blob.core.windows.net\/media\/TNBlogsFS\/BlogFileStorage\/blogs_msdn\/powershell\/WindowsLiveWriter\/outgridview_A5D1\/clip_image002%5B4%5D_thumb_1.jpg\" width=\"644\" border=\"0\" \/><\/a><\/p>\n<p>After issuing the command, a new window will appear that contains a grid that has been populated with the data from the pipeline.&#160; This window is separate from the main PowerShell window.&#160; You can go back to PowerShell and issue different commands or even create new grid windows.&#160; However, if you close PowerShell &#8211; then all grid windows will also be closed.<\/p>\n<p>The search feature makes it easy to quickly find a specific piece of data.&#160; Here are a few details on how the search mechanism works: <\/p>\n<p>&#183; Searches across all columns and rows<\/p>\n<p>&#183; Search on a single column with this syntax &lt;columnName&gt;:searchValue&#160;&#160; <\/p>\n<p>&#183; Matching is not case-sensitive<\/p>\n<p>&#183; Search will match any part of a value <\/p>\n<p>&#183; If the search text is enclosed in quotes &#8211; the search should only find items that have the exact phrase.<\/p>\n<p>&#183; May search on more than 1 word &#8211;search should treat it like there is a AND between the words.&#160; In other words &#8211; it should find rows that have word a AND word b<\/p>\n<p>&#183; Special characters like punctuation, semi-colons, colons, brackets, less than, greater than, brackets, braces are NOT ignored.&#160; <\/p>\n<p>The following example demonstrates searching the application log for entries containing &#8220;SQL&#8221;.&#160; Any entries that don&#8217;t contain that text are no longer in the list.&#160; To get the grid to display all of the entries again erase the text in the search area.<\/p>\n<p><a href=\"https:\/\/msdnshared.blob.core.windows.net\/media\/TNBlogsFS\/BlogFileStorage\/blogs_msdn\/powershell\/WindowsLiveWriter\/outgridview_A5D1\/clip_image004%5B6%5D.jpg\"><img decoding=\"async\" style=\"border-top-width: 0px;border-left-width: 0px;border-bottom-width: 0px;border-right-width: 0px\" height=\"260\" alt=\"clip_image004[6]\" src=\"https:\/\/msdnshared.blob.core.windows.net\/media\/TNBlogsFS\/BlogFileStorage\/blogs_msdn\/powershell\/WindowsLiveWriter\/outgridview_A5D1\/clip_image004%5B6%5D_thumb.jpg\" width=\"644\" border=\"0\" \/><\/a><\/p>\n<p>The grid allows sorting by any column &#8211;clicking on the column header for a column then the grid will be sorted by that column in ascending order.&#160; Clicking again on the same column then the sort direction will be reversed (descending).&#160; <\/p>\n<p><a href=\"https:\/\/msdnshared.blob.core.windows.net\/media\/TNBlogsFS\/BlogFileStorage\/blogs_msdn\/powershell\/WindowsLiveWriter\/outgridview_A5D1\/clip_image006%5B4%5D.jpg\"><img decoding=\"async\" style=\"border-top-width: 0px;border-left-width: 0px;border-bottom-width: 0px;border-right-width: 0px\" height=\"196\" alt=\"clip_image006[4]\" src=\"https:\/\/msdnshared.blob.core.windows.net\/media\/TNBlogsFS\/BlogFileStorage\/blogs_msdn\/powershell\/WindowsLiveWriter\/outgridview_A5D1\/clip_image006%5B4%5D_thumb.jpg\" width=\"644\" border=\"0\" \/><\/a><\/p>\n<p>Grouping is a useful technique to better help visually organize your data.&#160; To turn grouping on right-click anywhere in the column headers and select &#8220;Show in Groups&#8221; to toggle that feature on.&#160;&#160; When you click on one of the column headers the grid will group by that column.&#160; The following example demonstrates grouping a list of services by the status column.&#160; The items under each grouping may be hidden or shown by selecting the arrow next to each grouping.&#160; All&#160; groupings are expanded (shown) by default.&#160; It is also possible to reverse the sort direction of the groups by clicking the column in the header.<\/p>\n<p><a href=\"https:\/\/msdnshared.blob.core.windows.net\/media\/TNBlogsFS\/BlogFileStorage\/blogs_msdn\/powershell\/WindowsLiveWriter\/outgridview_A5D1\/clip_image008%5B4%5D.jpg\"><img decoding=\"async\" style=\"border-top-width: 0px;border-left-width: 0px;border-bottom-width: 0px;border-right-width: 0px\" height=\"170\" alt=\"clip_image008[4]\" src=\"https:\/\/msdnshared.blob.core.windows.net\/media\/TNBlogsFS\/BlogFileStorage\/blogs_msdn\/powershell\/WindowsLiveWriter\/outgridview_A5D1\/clip_image008%5B4%5D_thumb.jpg\" width=\"644\" border=\"0\" \/><\/a><\/p>\n<p>Please send feedback to <a href=\"mailto:gPSfeedback@microsoft.com\">gPSfeedback@microsoft.com<\/a><\/p>\n<p>Thanks,<\/p>\n<p>Brent Taft [MSFT]<\/p>\n<p>Senior Program Manager <\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the new feature areas for PowerShell V2 CTP is support for rich output.&#160; The out-gridview cmdlet allows you to send the output of any PowerShell command into a fully interactive grid window.&#160; This feature is available from standard PowerShell and Graphical PowerShell.&#160; Out-GridView can be very useful if the output of your command [&hellip;]<\/p>\n","protected":false},"author":600,"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-6871","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell"],"acf":[],"blog_post_summary":"<p>One of the new feature areas for PowerShell V2 CTP is support for rich output.&#160; The out-gridview cmdlet allows you to send the output of any PowerShell command into a fully interactive grid window.&#160; This feature is available from standard PowerShell and Graphical PowerShell.&#160; Out-GridView can be very useful if the output of your command [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/6871","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\/600"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/comments?post=6871"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/6871\/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=6871"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/categories?post=6871"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/tags?post=6871"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}