{"id":8,"date":"2016-05-02T09:02:49","date_gmt":"2016-05-02T16:02:49","guid":{"rendered":"http:\/\/vicds.myds.me\/wordpress\/?p=8"},"modified":"2020-08-21T13:24:06","modified_gmt":"2020-08-21T20:24:06","slug":"outgridview","status":"publish","type":"post","link":"https:\/\/www.vscrypt.com\/outgridview\/","title":{"rendered":"Send PowerShell Output to an Interactive Table"},"content":{"rendered":"\n<p>When you think about Windows PowerShell, you will mostly imagine a console-based graphical user interface that might seem overwhelming to some. However, PowerShell 2.0 introduced a new cmdlet that sends output to an interactive graphical user interface that is easy on the eyes.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Details<\/h2>\n\n\n\n<p>The Out-GridView cmdlet sends output to an interactive table in a separate window. &nbsp;Since this cmdlet requires a user interface it does not work on Server Core installation of Windows Server. &nbsp;You can <strong>Hide<\/strong>, <strong>Show<\/strong> and <strong>Reorder<\/strong> columns in the output table (right-click and choose Select Columns). &nbsp;You can also <strong>sort<\/strong> columns by just clicking on the column headers (keep clicking to toggle between ascending and descending). &nbsp;There is also a <strong>Quick Filter<\/strong> which allows you to search for text in a column, search for literals and search for multiple words. &nbsp;The <strong>Criteria Filter<\/strong> is very useful for very large sets of data (use the Add criteria drop-down menu). &nbsp;Lastly, you can <strong>Copy<\/strong> and <strong>Paste<\/strong> from the the Out-GridView using keyboard shortcut keys <code>CTRL+C<\/code>. &nbsp;You will be able to paste the copied date into any text or spreadsheet program. &nbsp;You can also type&nbsp;<code>Get-Help Out-GridView -Full<\/code>&nbsp;to get detailed instructions on using this cmdlet.<\/p>\n\n\n\n<p>I find this command&nbsp;useful when the result I am expecting back from a cmdlet is very large to review in the PowerShell window where you would otherwise output to a CSV file. &nbsp;Using this allows you to quickly visualize the resulting data, filter, sort and then copy and paste a narrowed down version of the result to your final output method. &nbsp;I personally find this command very useful in my day-to-day tasks related to Microsoft Office 365 tenant administration, Active Directory reporting and just basic system commands using PowerShell.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Syntax<\/h2>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"PowerShell\" data-shcb-language-slug=\"powershell\"><span><code class=\"hljs language-powershell shcb-wrap-lines\"><span class=\"hljs-keyword\">Parameter<\/span> Set: PassThru\n<span class=\"hljs-built_in\">Out-GridView<\/span> &#91;-<span class=\"hljs-type\">InputObject<\/span> (<span class=\"hljs-type\">PSObject<\/span>)] &#91;-<span class=\"hljs-type\">PassThru<\/span>] &#91;-<span class=\"hljs-type\">Title<\/span> (<span class=\"hljs-built_in\">String<\/span>)] &#91;<span class=\"hljs-type\">CommonParameters<\/span>]\n\n<span class=\"hljs-keyword\">Parameter<\/span> Set: OutputMode\n<span class=\"hljs-built_in\">Out-GridView<\/span> &#91;-<span class=\"hljs-type\">InputObject<\/span> (<span class=\"hljs-type\">PSObject<\/span>)] &#91;-<span class=\"hljs-type\">OutputMode<\/span>  {<span class=\"hljs-type\">None<\/span> | <span class=\"hljs-built_in\">Single<\/span> | <span class=\"hljs-type\">Multiple<\/span>} ] &#91;-<span class=\"hljs-type\">Title<\/span> (<span class=\"hljs-built_in\">String<\/span>)] &#91;<span class=\"hljs-type\">CommonParameters<\/span>]\n\n<span class=\"hljs-keyword\">Parameter<\/span> Set: Wait\n<span class=\"hljs-built_in\">Out-GridView<\/span> &#91;-<span class=\"hljs-type\">InputObject<\/span> (<span class=\"hljs-type\">PSObject<\/span>)] &#91;-<span class=\"hljs-type\">Title<\/span> (<span class=\"hljs-built_in\">String<\/span>)] &#91;-<span class=\"hljs-type\">Wait<\/span>] &#91;<span class=\"hljs-type\">CommonParameters<\/span>]<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PowerShell<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">powershell<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h2 class=\"wp-block-heading\">Examples<\/h2>\n\n\n\n<h3 class=\"has-normal-font-size wp-block-heading\">Example 1<\/h3>\n\n\n\n<p>Gets the currently running processes on the local computer and sends it to a grid view window.<\/p><div id=\"vscry-1\" class=\"vscry-content\"><script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-0201055796701118\" crossorigin=\"anonymous\"><\/script><ins class=\"adsbygoogle\" style=\"display:block; text-align:center;\" data-ad-client=\"ca-pub-0201055796701118\" \ndata-ad-slot=\"1379369629\" \ndata-ad-layout=\"in-article\"\ndata-ad-format=\"fluid\"><\/ins>\n<script> \n(adsbygoogle = window.adsbygoogle || []).push({}); \n<\/script>\n<\/div>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"PowerShell\" data-shcb-language-slug=\"powershell\"><span><code class=\"hljs language-powershell\"><span class=\"hljs-built_in\">Get-Process<\/span> | <span class=\"hljs-built_in\">Out-GridView<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PowerShell<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">powershell<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"has-normal-font-size wp-block-heading\">Example 2<\/h3>\n\n\n\n<p>Gets the currently running processes on the local computer and sends selected fields (columns) to a grid view window while also sorting by a selected column.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"PowerShell\" data-shcb-language-slug=\"powershell\"><span><code class=\"hljs language-powershell shcb-wrap-lines\"><span class=\"hljs-built_in\">Get-Process<\/span> | <span class=\"hljs-built_in\">Select-Object<\/span> <span class=\"hljs-literal\">-Property<\/span> Name, WorkingSet | <span class=\"hljs-built_in\">Sort-Object<\/span> <span class=\"hljs-literal\">-Property<\/span> WorkingSet <span class=\"hljs-literal\">-Descending<\/span> | <span class=\"hljs-built_in\">Out-GridView<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PowerShell<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">powershell<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>This cmdlet has a lot of uses and I would love to see how you are making use of it. &nbsp;Please feel free to add your use case below in the comment section to share with everyone.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>When you think about Windows PowerShell, you will mostly imagine a console-based graphical user interface that might seem overwhelming to some. However, PowerShell 2.0 introduced &hellip; <\/p>\n","protected":false},"author":1,"featured_media":11,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,4],"tags":[11,10,9],"class_list":["post-8","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ps","category-scripts","tag-cmdlet","tag-out-gridview","tag-powershell"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Send PowerShell Output to an Interactive Table - VScrypt<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.vscrypt.com\/outgridview\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Send PowerShell Output to an Interactive Table - VScrypt\" \/>\n<meta property=\"og:description\" content=\"When you think about Windows PowerShell, you will mostly imagine a console-based graphical user interface that might seem overwhelming to some. However, PowerShell 2.0 introduced &hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.vscrypt.com\/outgridview\/\" \/>\n<meta property=\"og:site_name\" content=\"VScrypt\" \/>\n<meta property=\"article:published_time\" content=\"2016-05-02T16:02:49+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-08-21T20:24:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.vscrypt.com\/wp-content\/uploads\/2016\/05\/2016-05-02_9-04-35.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"578\" \/>\n\t<meta property=\"og:image:height\" content=\"398\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Vikram\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Vikram\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.vscrypt.com\/outgridview\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.vscrypt.com\/outgridview\/\"},\"author\":{\"name\":\"Vikram\",\"@id\":\"https:\/\/www.vscrypt.com\/#\/schema\/person\/855a3e6d9310019d20f2da32115df36a\"},\"headline\":\"Send PowerShell Output to an Interactive Table\",\"datePublished\":\"2016-05-02T16:02:49+00:00\",\"dateModified\":\"2020-08-21T20:24:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.vscrypt.com\/outgridview\/\"},\"wordCount\":387,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.vscrypt.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.vscrypt.com\/outgridview\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.vscrypt.com\/wp-content\/uploads\/2016\/05\/2016-05-02_9-04-35.jpg\",\"keywords\":[\"cmdlet\",\"out-gridview\",\"powershell\"],\"articleSection\":[\"PowerShell\",\"Scripts\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.vscrypt.com\/outgridview\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.vscrypt.com\/outgridview\/\",\"url\":\"https:\/\/www.vscrypt.com\/outgridview\/\",\"name\":\"Send PowerShell Output to an Interactive Table - VScrypt\",\"isPartOf\":{\"@id\":\"https:\/\/www.vscrypt.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.vscrypt.com\/outgridview\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.vscrypt.com\/outgridview\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.vscrypt.com\/wp-content\/uploads\/2016\/05\/2016-05-02_9-04-35.jpg\",\"datePublished\":\"2016-05-02T16:02:49+00:00\",\"dateModified\":\"2020-08-21T20:24:06+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.vscrypt.com\/outgridview\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.vscrypt.com\/outgridview\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.vscrypt.com\/outgridview\/#primaryimage\",\"url\":\"https:\/\/www.vscrypt.com\/wp-content\/uploads\/2016\/05\/2016-05-02_9-04-35.jpg\",\"contentUrl\":\"https:\/\/www.vscrypt.com\/wp-content\/uploads\/2016\/05\/2016-05-02_9-04-35.jpg\",\"width\":578,\"height\":398,\"caption\":\"Out-GridView\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.vscrypt.com\/outgridview\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.vscrypt.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Send PowerShell Output to an Interactive Table\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.vscrypt.com\/#website\",\"url\":\"https:\/\/www.vscrypt.com\/\",\"name\":\"VScrypt\",\"description\":\"Helpful scripts, snippets and guides...\",\"publisher\":{\"@id\":\"https:\/\/www.vscrypt.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.vscrypt.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.vscrypt.com\/#organization\",\"name\":\"VScrypt\",\"url\":\"https:\/\/www.vscrypt.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.vscrypt.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.vscrypt.com\/wp-content\/uploads\/2019\/01\/logo-1.png\",\"contentUrl\":\"https:\/\/www.vscrypt.com\/wp-content\/uploads\/2019\/01\/logo-1.png\",\"width\":200,\"height\":80,\"caption\":\"VScrypt\"},\"image\":{\"@id\":\"https:\/\/www.vscrypt.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.vscrypt.com\/#\/schema\/person\/855a3e6d9310019d20f2da32115df36a\",\"name\":\"Vikram\",\"description\":\"I am just an IT person trying to share as much knowledge as possible hoping someone will find it helpful. It just takes time to organize everything from my head into something that makes sense.\",\"url\":\"https:\/\/www.vscrypt.com\/author\/vchand\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Send PowerShell Output to an Interactive Table - VScrypt","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.vscrypt.com\/outgridview\/","og_locale":"en_US","og_type":"article","og_title":"Send PowerShell Output to an Interactive Table - VScrypt","og_description":"When you think about Windows PowerShell, you will mostly imagine a console-based graphical user interface that might seem overwhelming to some. However, PowerShell 2.0 introduced &hellip;","og_url":"https:\/\/www.vscrypt.com\/outgridview\/","og_site_name":"VScrypt","article_published_time":"2016-05-02T16:02:49+00:00","article_modified_time":"2020-08-21T20:24:06+00:00","og_image":[{"width":578,"height":398,"url":"https:\/\/www.vscrypt.com\/wp-content\/uploads\/2016\/05\/2016-05-02_9-04-35.jpg","type":"image\/jpeg"}],"author":"Vikram","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Vikram","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.vscrypt.com\/outgridview\/#article","isPartOf":{"@id":"https:\/\/www.vscrypt.com\/outgridview\/"},"author":{"name":"Vikram","@id":"https:\/\/www.vscrypt.com\/#\/schema\/person\/855a3e6d9310019d20f2da32115df36a"},"headline":"Send PowerShell Output to an Interactive Table","datePublished":"2016-05-02T16:02:49+00:00","dateModified":"2020-08-21T20:24:06+00:00","mainEntityOfPage":{"@id":"https:\/\/www.vscrypt.com\/outgridview\/"},"wordCount":387,"commentCount":0,"publisher":{"@id":"https:\/\/www.vscrypt.com\/#organization"},"image":{"@id":"https:\/\/www.vscrypt.com\/outgridview\/#primaryimage"},"thumbnailUrl":"https:\/\/www.vscrypt.com\/wp-content\/uploads\/2016\/05\/2016-05-02_9-04-35.jpg","keywords":["cmdlet","out-gridview","powershell"],"articleSection":["PowerShell","Scripts"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.vscrypt.com\/outgridview\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.vscrypt.com\/outgridview\/","url":"https:\/\/www.vscrypt.com\/outgridview\/","name":"Send PowerShell Output to an Interactive Table - VScrypt","isPartOf":{"@id":"https:\/\/www.vscrypt.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.vscrypt.com\/outgridview\/#primaryimage"},"image":{"@id":"https:\/\/www.vscrypt.com\/outgridview\/#primaryimage"},"thumbnailUrl":"https:\/\/www.vscrypt.com\/wp-content\/uploads\/2016\/05\/2016-05-02_9-04-35.jpg","datePublished":"2016-05-02T16:02:49+00:00","dateModified":"2020-08-21T20:24:06+00:00","breadcrumb":{"@id":"https:\/\/www.vscrypt.com\/outgridview\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.vscrypt.com\/outgridview\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.vscrypt.com\/outgridview\/#primaryimage","url":"https:\/\/www.vscrypt.com\/wp-content\/uploads\/2016\/05\/2016-05-02_9-04-35.jpg","contentUrl":"https:\/\/www.vscrypt.com\/wp-content\/uploads\/2016\/05\/2016-05-02_9-04-35.jpg","width":578,"height":398,"caption":"Out-GridView"},{"@type":"BreadcrumbList","@id":"https:\/\/www.vscrypt.com\/outgridview\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.vscrypt.com\/"},{"@type":"ListItem","position":2,"name":"Send PowerShell Output to an Interactive Table"}]},{"@type":"WebSite","@id":"https:\/\/www.vscrypt.com\/#website","url":"https:\/\/www.vscrypt.com\/","name":"VScrypt","description":"Helpful scripts, snippets and guides...","publisher":{"@id":"https:\/\/www.vscrypt.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.vscrypt.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.vscrypt.com\/#organization","name":"VScrypt","url":"https:\/\/www.vscrypt.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.vscrypt.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.vscrypt.com\/wp-content\/uploads\/2019\/01\/logo-1.png","contentUrl":"https:\/\/www.vscrypt.com\/wp-content\/uploads\/2019\/01\/logo-1.png","width":200,"height":80,"caption":"VScrypt"},"image":{"@id":"https:\/\/www.vscrypt.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.vscrypt.com\/#\/schema\/person\/855a3e6d9310019d20f2da32115df36a","name":"Vikram","description":"I am just an IT person trying to share as much knowledge as possible hoping someone will find it helpful. It just takes time to organize everything from my head into something that makes sense.","url":"https:\/\/www.vscrypt.com\/author\/vchand\/"}]}},"_links":{"self":[{"href":"https:\/\/www.vscrypt.com\/api\/wp\/v2\/posts\/8","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.vscrypt.com\/api\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.vscrypt.com\/api\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.vscrypt.com\/api\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vscrypt.com\/api\/wp\/v2\/comments?post=8"}],"version-history":[{"count":0,"href":"https:\/\/www.vscrypt.com\/api\/wp\/v2\/posts\/8\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.vscrypt.com\/api\/wp\/v2\/media\/11"}],"wp:attachment":[{"href":"https:\/\/www.vscrypt.com\/api\/wp\/v2\/media?parent=8"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vscrypt.com\/api\/wp\/v2\/categories?post=8"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vscrypt.com\/api\/wp\/v2\/tags?post=8"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}