{"id":4371,"date":"2009-03-11T19:10:34","date_gmt":"2009-03-11T19:10:34","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/powershell\/2009\/03\/11\/out-gridview-revisited\/"},"modified":"2019-02-18T13:12:46","modified_gmt":"2019-02-18T20:12:46","slug":"out-gridview-revisited","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/powershell\/out-gridview-revisited\/","title":{"rendered":"Out-GridView Revisited"},"content":{"rendered":"<p>It has been more than one year since we updated <a href=\"http:\/\/blogs.msdn.com\/powershell\/archive\/2007\/12\/17\/out-gridview.aspx\">Out-GridView feature<\/a> with you. In case you are not familiar with Out-GridView yet, it is a unique PowerShell cmdlet that users can pipe command output to a separate window, and it enables users organize and analyze output data easily. The previous blog entry by Brent gave an overview of Out-GridView cmdlet. <\/p>\n<p>So, what\u2019s new for Out-GridView in Windows PowerShell CTP3? A major feature we added was query filtering functionality; data can be queried according to their properties through this feature. Let\u2019s look at an example. Running command: \u201cGet-ChildItem | Out-GridView\u201d, an Out-GridView window populated with all the file\/directory data in the current directory will pop up. Clicking \u201cQuery\u201d and \u201cAdd\u201d buttons on the Out-GridView window, we will see all the properties for file\/directory info: \u201cMode\u201d, \u201cLastWriteTime\u201d, and etc. Assume we are interested in finding files\/ directories with names containing string \u201cdo\u201d, select \u201cName\u201d, type \u201cdo\u201d in the query text box, then we will have returned results: \u201cDocuments\u201d and \u201cDownloads\u201d. In addition to query operator \u201ccontains\u201d,&#160; we have more operators, such as \u201cstarts with\u201d, \u201cends with\u201d&#160; for users to compose more varieties of queries.<\/p>\n<p><a href=\"https:\/\/msdnshared.blob.core.windows.net\/media\/TNBlogsFS\/BlogFileStorage\/blogs_msdn\/powershell\/WindowsLiveWriter\/OutGridViewRevisited_A872\/image13.png\"><img decoding=\"async\" style=\"border-right-width: 0px;border-top-width: 0px;border-bottom-width: 0px;border-left-width: 0px\" title=\"image\" border=\"0\" alt=\"image\" src=\"https:\/\/msdnshared.blob.core.windows.net\/media\/TNBlogsFS\/BlogFileStorage\/blogs_msdn\/powershell\/WindowsLiveWriter\/OutGridViewRevisited_A872\/image13_thumb.png\" width=\"382\" height=\"242\" \/><\/a> <\/p>\n<p>We also provided multiple ways to organize the layout of Out-GridView window. To select columns to display, you can use PowerShell cmdlet \u201cSelect-Object\u201d. For example, \u201cGet-ChildItem | Select-Object -Property Name,Length | Out-GridView\u201d will only display \u201cName\u201d and \u201cLength\u201d columns. The other way is through \u201cSelect Columns\u201d UI. Click any column header, and click \u201cSelect Columns\u2026\u201d, then you can use the UI (shown below) to select the columns to be displayed. The columns in the \u201cSelected columns\u201d box will be displayed. With the&#160; \u201cSelect Columns\u201d UI, we can also use \u201cmove up\/down\u201d buttons to re-order the columns in the Out-GridView window. Alternatively, you can simply drag &amp; drop a column to do re-ordering. <\/p>\n<p><a href=\"https:\/\/msdnshared.blob.core.windows.net\/media\/TNBlogsFS\/BlogFileStorage\/blogs_msdn\/powershell\/WindowsLiveWriter\/OutGridViewRevisited_A872\/image_3.png\"><img decoding=\"async\" style=\"border-right-width: 0px;border-top-width: 0px;border-bottom-width: 0px;border-left-width: 0px\" title=\"image\" border=\"0\" alt=\"image\" src=\"https:\/\/msdnshared.blob.core.windows.net\/media\/TNBlogsFS\/BlogFileStorage\/blogs_msdn\/powershell\/WindowsLiveWriter\/OutGridViewRevisited_A872\/image_thumb.png\" width=\"392\" height=\"139\" \/><\/a> <\/p>\n<p>To offer a better GUI user experience, Out-GridView window supports multiple row selection and copy\/paste. For selecting consecutive rows, you can click starting row, and press Shift key, then click ending row. To select non consecutive rows, click a row, press Ctrl key, and then click more rows. If you\u2019d like to save the data in in word processing software or spreadsheet, use the generic \u201cCtrl + C\u201d to copy the rows selected, and \u201cCtrl + V\u201d to paste them. <\/p>\n<p>&#160;<\/p>\n<p>Xin Li<\/p>\n<p>Windows PowerShell Team<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It has been more than one year since we updated Out-GridView feature with you. In case you are not familiar with Out-GridView yet, it is a unique PowerShell cmdlet that users can pipe command output to a separate window, and it enables users organize and analyze output data easily. The previous blog entry by Brent [&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-4371","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell"],"acf":[],"blog_post_summary":"<p>It has been more than one year since we updated Out-GridView feature with you. In case you are not familiar with Out-GridView yet, it is a unique PowerShell cmdlet that users can pipe command output to a separate window, and it enables users organize and analyze output data easily. The previous blog entry by Brent [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/4371","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=4371"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/4371\/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=4371"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/categories?post=4371"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/tags?post=4371"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}