{"id":8835,"date":"2022-02-03T14:00:16","date_gmt":"2022-02-03T19:00:16","guid":{"rendered":"https:\/\/jdhitsolutions.com\/blog\/?p=8835"},"modified":"2022-02-03T14:00:20","modified_gmt":"2022-02-03T19:00:20","slug":"powershell-7-consolegridview","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8835\/powershell-7-consolegridview\/","title":{"rendered":"PowerShell 7 ConsoleGridView"},"content":{"rendered":"\n<p>Last night during my presentation for the Research Triangle PowerShell User Group, I briefly demonstrated a PowerShell 7 command called Out-ConsoleGridView. This command will not run in Windows PowerShell. If you haven't thought about running PowerShell 7, maybe you'll reconsider after learning more about this tool.<\/p>\n\n\n\n<p>You all know about Out-Gridview, which also works in later versions of PowerShell 7. Out-ConsoleGridview, which has an alias of <em>ocgv<\/em>, will take pipelined input and display it as a table in the console. You can filter and select objects just as you do with Out-Gridview, but there is no separate display. The output remains in your console session.<\/p>\n\n\n\n<p>You need to install a module from the PowerShell Gallery in a PowerShell 7 session to get this command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"powershell\" class=\"language-powershell\">install-module microsoft.powershell.consoleguitools<\/code><\/pre>\n\n\n\n<p>The command is simple enough to use.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"powershell\" class=\"language-powershell\">get-process | Out-ConsoleGridView<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"658\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-1-1024x658.png\" alt=\"Out-ConsoleGridView\" class=\"wp-image-8838\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-1-1024x658.png 1024w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-1-300x193.png 300w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-1-768x493.png 768w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-1-850x546.png 850w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-1.png 1107w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>The cmdlet lets you select multiple items by default and automatically passes them to the pipeline. Out-ConsoleGridView works cross-platform as well.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-linux.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"658\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-linux-1024x658.png\" alt=\"Out-ConsoleGridview on Linux\" class=\"wp-image-8839\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-linux-1024x658.png 1024w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-linux-300x193.png 300w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-linux-768x493.png 768w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-linux-850x546.png 850w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-linux.png 1107w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>One thing to be aware of is that the cmdlet takes its color cues from the hosting application. If you run PowerShell inside Windows Terminal, you might have a different experience based on the color scheme you are using.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"658\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-2-1024x658.png\" alt=\"Out-ConsoleGridview with a different color scheme\" class=\"wp-image-8840\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-2-1024x658.png 1024w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-2-300x193.png 300w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-2-768x493.png 768w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-2-850x546.png 850w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-2.png 1107w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>From what I can tell, the background color is based on whatever the host decides is \"blue.\" The status bar is \"brightblack,\" and the selection highlight is \"cyan.\" In PowerShell 7, you can see these values with $PSStyle.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-color.png\"><img loading=\"lazy\" decoding=\"async\" width=\"548\" height=\"649\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-color.png\" alt=\"Out-Gridview color scheme\" class=\"wp-image-8841\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-color.png 548w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-color-253x300.png 253w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-color-300x355.png 300w\" sizes=\"auto, (max-width: 548px) 100vw, 548px\" \/><\/a><\/figure>\n\n\n\n<p>You'll see different renderings of these values in Windows Terminal based on your color scheme. There is no way to alter the color scheme used by Out-ConsoleGridView itself. Although this is an open issue in the cmdlet's <a href=\"https:\/\/github.com\/PowerShell\/GraphicalTools\/\" target=\"_blank\" rel=\"noreferrer noopener\">GitHub repository<\/a>. The best you can do is edit values in the Windows Terminal settings.json file for the profile's color scheme.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/terminal-colorscheme-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"400\" height=\"485\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/terminal-colorscheme-1.png\" alt=\"\" class=\"wp-image-8843\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/terminal-colorscheme-1.png 400w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/terminal-colorscheme-1-247x300.png 247w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/terminal-colorscheme-1-300x364.png 300w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/a><\/figure>\n\n\n\n<p>Like Out-Gridview, you can perform additional filtering of the output. Be careful. The filtering treats each line item as a string. The filtering is nothing more than a pattern match like 'co'. Although, you can use fancy regex patterns.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-filtering.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"658\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-filtering-1024x658.png\" alt=\"Out-ConsoleGridView filtering\" class=\"wp-image-8844\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-filtering-1024x658.png 1024w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-filtering-300x193.png 300w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-filtering-768x493.png 768w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-filtering-850x546.png 850w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-filtering.png 1107w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>As I mentioned, you can select items with the space bar, and pressing Enter passes the object back to the PowerShell pipeline. This offers some intriguing possibilities. Here's one example.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"powershell\" class=\"language-powershell\">$events = Import-Csv C:\\scripts\\company.csv | \nOut-ConsoleGridView -title \"Select computers to check\" | \nForeach-Object -Parallel {\n    Get-Winevent -LogName System -max 500 -ComputerName $_.computername\n}<\/code><\/pre>\n\n\n\n<p>I'm going to import data from a CSV file and pipe it to Out-ConsoleGridView.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-picker.png\"><img loading=\"lazy\" decoding=\"async\" width=\"962\" height=\"512\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-picker.png\" alt=\"Out-ConsoleGridView object picker.\" class=\"wp-image-8845\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-picker.png 962w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-picker-300x160.png 300w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-picker-768x409.png 768w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-picker-850x452.png 850w\" sizes=\"auto, (max-width: 962px) 100vw, 962px\" \/><\/a><\/figure>\n\n\n\n<p>The selected objects are passed back to the pipeline, where I run a Get-Winevent command in parallel. My demonstration is only using two computers and getting a small number of event log records. But you could easily scale this out.<\/p>\n\n\n\n<p>I can then take the results and view them in Out-ConsoleGridview.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"powershell\" class=\"language-powershell\">$events | Select-Object -Property Machinename,TimeCreated,LevelDisplayName,Message | \nOut-ConsoleGridView  | Format-List<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-viewer.png\"><img loading=\"lazy\" decoding=\"async\" width=\"962\" height=\"512\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-viewer.png\" alt=\"Out-ConsoleGridview as a viewer\" class=\"wp-image-8846\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-viewer.png 962w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-viewer-300x160.png 300w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-viewer-768x409.png 768w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-viewer-850x452.png 850w\" sizes=\"auto, (max-width: 962px) 100vw, 962px\" \/><\/a><\/figure>\n\n\n\n<p>I'm using the Filter feature to get Errors. I'll select both entries and press Enter, which sends the results to Format-List, making the event log record easier to read.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/eventlog-errors.png\"><img loading=\"lazy\" decoding=\"async\" width=\"979\" height=\"512\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/eventlog-errors.png\" alt=\"event log errors\" class=\"wp-image-8847\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/eventlog-errors.png 979w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/eventlog-errors-300x157.png 300w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/eventlog-errors-768x402.png 768w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/eventlog-errors-850x445.png 850w\" sizes=\"auto, (max-width: 979px) 100vw, 979px\" \/><\/a><\/figure>\n\n\n\n<p>There is also an issue about adding a way to select all items in the list. Currently, you have to select each one manually.<\/p>\n\n\n\n<p>I use this command often. One of the drawbacks with Out-Gridview is that I can't control the size, and often on my 44\" monitor, the window is stretched almost the entire width of the monitor. I like having the grid view limited to my console window.<\/p>\n\n\n\n<p>The last item to mention is that you can't use Out-ConsoleGridview in a remoting session. But that doesn't preclude you from using remoting and running Out-ConsoleGridview on your desktop.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"powershell\" class=\"language-powershell\">$svc = \"dns\",\"adws\",\"kdc\",\"w32time\",\"netlogon\"\nInvoke-Command { Get-Service $using:svc } -computername dom1,dom2 |\nSort-Object Name | Select-Object Status,Name,DisplayName,StartType,PSComputername | Out-ConsoleGridView -Title \"Domain Controller Services\" -OutputMode None<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large is-style-default\"><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-remote.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"658\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-remote-1024x658.png\" alt=\"\" class=\"wp-image-8849\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-remote-1024x658.png 1024w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-remote-300x193.png 300w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-remote-768x493.png 768w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-remote-850x546.png 850w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-remote.png 1107w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>Naturally, I encourage you to give this command a spin and try it out for yourself.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last night during my presentation for the Research Triangle PowerShell User Group, I briefly demonstrated a PowerShell 7 command called Out-ConsoleGridView. This command will not run in Windows PowerShell. If you haven&#8217;t thought about running PowerShell 7, maybe you&#8217;ll reconsider after learning more about this tool. You all know about Out-Gridview, which also works in&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"New on the blog: Having fun with #PowerShell 7 and Out-ConsoleGridview","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4],"tags":[],"class_list":["post-8835","post","type-post","status-publish","format-standard","hentry","category-powershell"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>PowerShell 7 ConsoleGridView &#8226; The Lonely Administrator<\/title>\n<meta name=\"description\" content=\"Let&#039;s have some fun and learn about the PowerShell 7 command Out-ConsoleGridView. All the benefits of Out-Gridview but in a console setting.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/8835\/powershell-7-consolegridview\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PowerShell 7 ConsoleGridView &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"Let&#039;s have some fun and learn about the PowerShell 7 command Out-ConsoleGridView. All the benefits of Out-Gridview but in a console setting.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/8835\/powershell-7-consolegridview\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2022-02-03T19:00:16+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-02-03T19:00:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-1-1024x658.png\" \/>\n<meta name=\"author\" content=\"Jeffery Hicks\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@JeffHicks\" \/>\n<meta name=\"twitter:site\" content=\"@JeffHicks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeffery Hicks\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/8835\\\/powershell-7-consolegridview\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/8835\\\/powershell-7-consolegridview\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"PowerShell 7 ConsoleGridView\",\"datePublished\":\"2022-02-03T19:00:16+00:00\",\"dateModified\":\"2022-02-03T19:00:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/8835\\\/powershell-7-consolegridview\\\/\"},\"wordCount\":574,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/8835\\\/powershell-7-consolegridview\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/ocgv-1-1024x658.png\",\"articleSection\":[\"PowerShell\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/8835\\\/powershell-7-consolegridview\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/8835\\\/powershell-7-consolegridview\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/8835\\\/powershell-7-consolegridview\\\/\",\"name\":\"PowerShell 7 ConsoleGridView &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/8835\\\/powershell-7-consolegridview\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/8835\\\/powershell-7-consolegridview\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/ocgv-1-1024x658.png\",\"datePublished\":\"2022-02-03T19:00:16+00:00\",\"dateModified\":\"2022-02-03T19:00:20+00:00\",\"description\":\"Let's have some fun and learn about the PowerShell 7 command Out-ConsoleGridView. All the benefits of Out-Gridview but in a console setting.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/8835\\\/powershell-7-consolegridview\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/8835\\\/powershell-7-consolegridview\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/8835\\\/powershell-7-consolegridview\\\/#primaryimage\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/ocgv-1.png\",\"contentUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/ocgv-1.png\",\"width\":1107,\"height\":711},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/8835\\\/powershell-7-consolegridview\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"PowerShell\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/powershell\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PowerShell 7 ConsoleGridView\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/\",\"name\":\"The Lonely Administrator\",\"description\":\"Practical Advice for the Automating IT Pro\",\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\",\"name\":\"Jeffery Hicks\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\",\"caption\":\"Jeffery Hicks\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PowerShell 7 ConsoleGridView &#8226; The Lonely Administrator","description":"Let's have some fun and learn about the PowerShell 7 command Out-ConsoleGridView. All the benefits of Out-Gridview but in a console setting.","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:\/\/jdhitsolutions.com\/blog\/powershell\/8835\/powershell-7-consolegridview\/","og_locale":"en_US","og_type":"article","og_title":"PowerShell 7 ConsoleGridView &#8226; The Lonely Administrator","og_description":"Let's have some fun and learn about the PowerShell 7 command Out-ConsoleGridView. All the benefits of Out-Gridview but in a console setting.","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8835\/powershell-7-consolegridview\/","og_site_name":"The Lonely Administrator","article_published_time":"2022-02-03T19:00:16+00:00","article_modified_time":"2022-02-03T19:00:20+00:00","og_image":[{"url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-1-1024x658.png","type":"","width":"","height":""}],"author":"Jeffery Hicks","twitter_card":"summary_large_image","twitter_creator":"@JeffHicks","twitter_site":"@JeffHicks","twitter_misc":{"Written by":"Jeffery Hicks","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8835\/powershell-7-consolegridview\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8835\/powershell-7-consolegridview\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"PowerShell 7 ConsoleGridView","datePublished":"2022-02-03T19:00:16+00:00","dateModified":"2022-02-03T19:00:20+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8835\/powershell-7-consolegridview\/"},"wordCount":574,"commentCount":2,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8835\/powershell-7-consolegridview\/#primaryimage"},"thumbnailUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-1-1024x658.png","articleSection":["PowerShell"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/8835\/powershell-7-consolegridview\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8835\/powershell-7-consolegridview\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8835\/powershell-7-consolegridview\/","name":"PowerShell 7 ConsoleGridView &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8835\/powershell-7-consolegridview\/#primaryimage"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8835\/powershell-7-consolegridview\/#primaryimage"},"thumbnailUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-1-1024x658.png","datePublished":"2022-02-03T19:00:16+00:00","dateModified":"2022-02-03T19:00:20+00:00","description":"Let's have some fun and learn about the PowerShell 7 command Out-ConsoleGridView. All the benefits of Out-Gridview but in a console setting.","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8835\/powershell-7-consolegridview\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/8835\/powershell-7-consolegridview\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8835\/powershell-7-consolegridview\/#primaryimage","url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-1.png","contentUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/ocgv-1.png","width":1107,"height":711},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8835\/powershell-7-consolegridview\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"PowerShell","item":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},{"@type":"ListItem","position":2,"name":"PowerShell 7 ConsoleGridView"}]},{"@type":"WebSite","@id":"https:\/\/jdhitsolutions.com\/blog\/#website","url":"https:\/\/jdhitsolutions.com\/blog\/","name":"The Lonely Administrator","description":"Practical Advice for the Automating IT Pro","publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jdhitsolutions.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9","name":"Jeffery Hicks","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg","url":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg","caption":"Jeffery Hicks"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg"}}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":6428,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell-core\/6428\/a-powershell-core-out-gridview-solution\/","url_meta":{"origin":8835,"position":0},"title":"A PowerShell Core Out-Gridview Solution","author":"Jeffery Hicks","date":"January 15, 2019","format":false,"excerpt":"As many of you know, this year I've made the jump to PowerShell Core as my \"daily driver\". A major driving factor was to discover the limitations. There are certainly plenty of advantages as we move to a cross-platform world. But the PowerShell Core is based .NET Core which does\u2026","rel":"","context":"In &quot;PowerShell Core&quot;","block_context":{"text":"PowerShell Core","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell-core\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/01\/image_thumb-16.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/01\/image_thumb-16.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/01\/image_thumb-16.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/01\/image_thumb-16.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":3121,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3121\/browsing-powershell-commands\/","url_meta":{"origin":8835,"position":1},"title":"Browsing PowerShell Commands","author":"Jeffery Hicks","date":"June 25, 2013","format":false,"excerpt":"Whenever I'm exploring a new PowerShell module or snapin, one of the first things I do is list all of the commands found within the module. PS C:\\scripts> get-command -module psworkflow CommandType Name ModuleName ----------- ---- ---------- Function New-PSWorkflowSession PSWorkflow Cmdlet New-PSWorkflowExecutionOption PSWorkflow You can specify either a module or\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"get-command-mod","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/06\/get-command-mod-1024x670.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/06\/get-command-mod-1024x670.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/06\/get-command-mod-1024x670.png?resize=525%2C300 1.5x"},"classes":[]},{"id":2787,"url":"https:\/\/jdhitsolutions.com\/blog\/friday-fun\/2787\/friday-fun-a-graphical-powershell-history-picker\/","url_meta":{"origin":8835,"position":2},"title":"Friday Fun A Graphical PowerShell History Picker","author":"Jeffery Hicks","date":"February 8, 2013","format":false,"excerpt":"One of my favorite features in PowerShell 3.0 is that you can select items in Out-Gridview which will then pipe the object back to the pipeline. One way I've been using this is as graphical \"picker\" for command history. I use Get-History, actually its alias h, all the time. Once\u2026","rel":"","context":"In &quot;Friday Fun&quot;","block_context":{"text":"Friday Fun","link":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},"img":{"alt_text":"history-picker","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/02\/history-picker-300x230.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":3661,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3661\/creating-cim-scripts-without-scripting\/","url_meta":{"origin":8835,"position":3},"title":"Creating CIM Scripts without Scripting","author":"Jeffery Hicks","date":"January 29, 2014","format":false,"excerpt":"When Windows 8 and Windows Server 2012 came out, along with PowerShell 3.0, we got our hands on some terrific technology in the form of the CIM cmdlets. Actually, we got much more than people realize. One of the reasons there was a big bump in the number of shipping\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":6531,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6531\/a-better-powershell-wpf-grid-viewer\/","url_meta":{"origin":8835,"position":4},"title":"A Better PowerShell WPF Grid Viewer","author":"Jeffery Hicks","date":"February 22, 2019","format":false,"excerpt":"A while ago I added a command called ConvertTo-WPFGrid in my PSScriptTools module. I wanted something similar to Out-Gridview but done in a WPF form. The initial version was ok and got the job done but it always felt lacking. The new version of the command is greatly improved I\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/02\/image_thumb-11.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/02\/image_thumb-11.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/02\/image_thumb-11.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/02\/image_thumb-11.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":7212,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7212\/adding-a-powershell-profile-calendar\/","url_meta":{"origin":8835,"position":5},"title":"Adding a PowerShell Profile Calendar","author":"Jeffery Hicks","date":"February 1, 2020","format":false,"excerpt":"Some of you may be aware of my PSCalendar module which you can install from the PowerShell Gallery. The module contains commands that you can use to display a console-based calendar.\u00a0 The calendar commands let you specify days to highlight. These might be days with special events or appointments. I\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/02\/image_thumb-2.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/02\/image_thumb-2.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/02\/image_thumb-2.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/02\/image_thumb-2.png?resize=700%2C400&ssl=1 2x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/8835","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=8835"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/8835\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=8835"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=8835"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=8835"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}