{"id":16,"date":"2018-05-13T11:00:00","date_gmt":"2018-05-13T11:00:00","guid":{"rendered":"http:\/\/nkascocom.nk\/wordpress\/index.php\/2018\/05\/13\/2018-5-10-built-in-alternatives-to-building-a-custom-gui\/"},"modified":"2018-05-13T11:00:00","modified_gmt":"2018-05-13T11:00:00","slug":"2018-5-10-built-in-alternatives-to-building-a-custom-gui","status":"publish","type":"post","link":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2018\/05\/13\/2018-5-10-built-in-alternatives-to-building-a-custom-gui\/","title":{"rendered":"Built in alternatives to building a custom GUI"},"content":{"rendered":"<div class=\"sqs-html-content\">\n<p class=\"\" style=\"white-space:pre-wrap;\">I&#8217;ve said it once and I&#8217;ll say it again, just because you can create a fancy GUI to run your tool doesn&#8217;t mean you need to. There are a number of built in alternatives that allow you to accept user input, show command progress,&nbsp;and display results in a way that is fully supported and doesn&#8217;t require you spending time building out an entire user interface. Today we&#8217;re going to look at 3 commands that you can leverage to achieve this:<\/p>\n<ol data-rte-list=\"default\">\n<li>\n<p class=\"\" style=\"white-space:pre-wrap;\">Show-Command<\/p>\n<\/li>\n<li>\n<p class=\"\" style=\"white-space:pre-wrap;\">Write-Progress<\/p>\n<\/li>\n<li>\n<p class=\"\" style=\"white-space:pre-wrap;\">Out-GridView<\/p>\n<\/li>\n<\/ol>\n<p class=\"\" style=\"white-space:pre-wrap;\"><strong>Show-Command:<\/strong><\/p>\n<p class=\"\" style=\"white-space:pre-wrap;\"><em>Show-Command<\/em>&nbsp;is a built in cmdlet that displays any command in a graphical window and allows you to manually enter parameters. If we simply need to get the computer name of the machine we want to execute our code on we can create a basic function for this:<\/p>\n<pre><code>function Get-Computer{\n&nbsp;&nbsp;&nbsp; Param(\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [String]\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $ComputerName\n&nbsp;&nbsp;&nbsp; )\n\n&nbsp;&nbsp;&nbsp; if($ComputerName.Trim() -eq \"\"){\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $ComputerName = $env:COMPUTERNAME\n&nbsp;&nbsp;&nbsp; } else {\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $ComputerName = $ComputerName.Trim()\n&nbsp;&nbsp;&nbsp; }\n\n&nbsp;&nbsp;&nbsp; $ComputerName.ToUpper()\n}<\/code><\/pre>\n<p class=\"\" style=\"white-space:pre-wrap;\">Then when you need to accept input simply call it with <em>Show-Command<\/em>, however this cmdlet only builds your syntax for you, if we want to actually execute it we need to pipe to <em>Invoke-Expression<\/em>:<\/p>\n<pre><code>$Computer = Show-Command Get-Computer -PassThru | Invoke-Expression<\/code><\/pre>\n<\/div>\n<div\n        class=\"\n          image-block-outer-wrapper\n          layout-caption-hidden\n          design-layout-inline\n          combination-animation-none\n          individual-animation-none\n          individual-text-animation-none\n        \"\n        data-test=\"image-block-inline-outer-wrapper\"\n    ><\/p>\n<figure\n            class=\"\n              sqs-block-image-figure\n              intrinsic\n            \"\n            style=\"max-width:877px;\"\n        ><\/p>\n<p>            <button\n                class=\"\n                  sqs-block-image-button\n                  lightbox\n                  \n          \n        \n                \"\n                data-description=\"\"\n                data-lightbox-theme=\"dark\"\n            ><br \/>\n              <span class=\"v6-visually-hidden\">View fullsize<\/span><\/p>\n<div\n              \n              \n              class=\"image-block-wrapper\"\n              data-animation-role=\"image\"\n              \n  \n\n          ><\/p>\n<div class=\"sqs-image-shape-container-element\n              \n          \n        \n              has-aspect-ratio\n            \" style=\"\n                position: relative;\n                \n                  padding-bottom:58.38084411621094%;\n                \n                overflow: hidden;-webkit-mask-image: -webkit-radial-gradient(white, black);\n              \"\n              ><\/p>\n<p>                  <img loading=\"lazy\" data-stretch=\"false\" src=\"https:\/\/images.squarespace-cdn.com\/content\/v1\/5ad54fd4cef37247634a91ca\/1526176593986-TCNIYRDIM1OFLHUN9LP8\/Show-Command.png\" data-image=\"https:\/\/images.squarespace-cdn.com\/content\/v1\/5ad54fd4cef37247634a91ca\/1526176593986-TCNIYRDIM1OFLHUN9LP8\/Show-Command.png\" data-image-dimensions=\"877x512\" data-image-focal-point=\"0.5,0.5\" alt=\"Show-Command.png\" data-load=\"false\" elementtiming=\"system-image-block\" src=\"https:\/\/images.squarespace-cdn.com\/content\/v1\/5ad54fd4cef37247634a91ca\/1526176593986-TCNIYRDIM1OFLHUN9LP8\/Show-Command.png\" width=\"877\" height=\"512\" alt=\"\" sizes=\"auto, (max-width: 640px) 100vw, (max-width: 767px) 100vw, 100vw\" style=\"display:block;object-fit: cover; width: 100%; height: 100%; object-position: 50% 50%\" onload=\"this.classList.add(&quot;loaded&quot;)\" srcset=\"https:\/\/images.squarespace-cdn.com\/content\/v1\/5ad54fd4cef37247634a91ca\/1526176593986-TCNIYRDIM1OFLHUN9LP8\/Show-Command.png?format=100w 100w, https:\/\/images.squarespace-cdn.com\/content\/v1\/5ad54fd4cef37247634a91ca\/1526176593986-TCNIYRDIM1OFLHUN9LP8\/Show-Command.png?format=300w 300w, https:\/\/images.squarespace-cdn.com\/content\/v1\/5ad54fd4cef37247634a91ca\/1526176593986-TCNIYRDIM1OFLHUN9LP8\/Show-Command.png?format=500w 500w, https:\/\/images.squarespace-cdn.com\/content\/v1\/5ad54fd4cef37247634a91ca\/1526176593986-TCNIYRDIM1OFLHUN9LP8\/Show-Command.png?format=750w 750w, https:\/\/images.squarespace-cdn.com\/content\/v1\/5ad54fd4cef37247634a91ca\/1526176593986-TCNIYRDIM1OFLHUN9LP8\/Show-Command.png?format=1000w 1000w, https:\/\/images.squarespace-cdn.com\/content\/v1\/5ad54fd4cef37247634a91ca\/1526176593986-TCNIYRDIM1OFLHUN9LP8\/Show-Command.png?format=1500w 1500w, https:\/\/images.squarespace-cdn.com\/content\/v1\/5ad54fd4cef37247634a91ca\/1526176593986-TCNIYRDIM1OFLHUN9LP8\/Show-Command.png?format=2500w 2500w\" loading=\"lazy\" decoding=\"async\" data-loader=\"sqs\"><\/p><\/div>\n<\/p><\/div>\n<p>            <\/button><\/p>\n<\/figure><\/div>\n<div class=\"sqs-html-content\">\n<p class=\"\" style=\"white-space:pre-wrap;\">&nbsp;<\/p>\n<p class=\"\" style=\"white-space:pre-wrap;\">Just like that you have an easy way to accept user input without going through the fuss of building out any custom UIs.<\/p>\n<p class=\"\" style=\"white-space:pre-wrap;\"><strong>Write-Progress:<\/strong><\/p>\n<p class=\"\" style=\"white-space:pre-wrap;\">This is one of my favorite cmdlets to use because it can be as simple or as complex as you need it to be. If you are not familiar with it you might get a bit lost trying to use the parameters initially, so I suggest starting with a basic display of an executing task. Simply put <em>Write-Progress<\/em> before and after your running code:<\/p>\n<pre><code>Write-Progress \"Checking ping status of remote machine...\"\n$PingCheck = Test-Connection -ComputerName $Computer -Count 3 -Quiet\nWrite-Progress \" \" -Completed<\/code><\/pre>\n<\/div>\n<div\n        class=\"\n          image-block-outer-wrapper\n          layout-caption-hidden\n          design-layout-inline\n          combination-animation-none\n          individual-animation-none\n          individual-text-animation-none\n        \"\n        data-test=\"image-block-inline-outer-wrapper\"\n    ><\/p>\n<figure\n            class=\"\n              sqs-block-image-figure\n              intrinsic\n            \"\n            style=\"max-width:885px;\"\n        ><\/p>\n<p>            <button\n                class=\"\n                  sqs-block-image-button\n                  lightbox\n                  \n          \n        \n                \"\n                data-description=\"\"\n                data-lightbox-theme=\"dark\"\n            ><br \/>\n              <span class=\"v6-visually-hidden\">View fullsize<\/span><\/p>\n<div\n              \n              \n              class=\"image-block-wrapper\"\n              data-animation-role=\"image\"\n              \n  \n\n          ><\/p>\n<div class=\"sqs-image-shape-container-element\n              \n          \n        \n              has-aspect-ratio\n            \" style=\"\n                position: relative;\n                \n                  padding-bottom:54.80226135253906%;\n                \n                overflow: hidden;-webkit-mask-image: -webkit-radial-gradient(white, black);\n              \"\n              ><\/p>\n<p>                  <img loading=\"lazy\" data-stretch=\"false\" src=\"https:\/\/images.squarespace-cdn.com\/content\/v1\/5ad54fd4cef37247634a91ca\/1526175080395-ZCKDEP6Y970AD7L61L8W\/write-progress1.png\" data-image=\"https:\/\/images.squarespace-cdn.com\/content\/v1\/5ad54fd4cef37247634a91ca\/1526175080395-ZCKDEP6Y970AD7L61L8W\/write-progress1.png\" data-image-dimensions=\"885x485\" data-image-focal-point=\"0.5,0.5\" alt=\"write-progress1.png\" data-load=\"false\" elementtiming=\"system-image-block\" src=\"https:\/\/images.squarespace-cdn.com\/content\/v1\/5ad54fd4cef37247634a91ca\/1526175080395-ZCKDEP6Y970AD7L61L8W\/write-progress1.png\" width=\"885\" height=\"485\" alt=\"\" sizes=\"auto, (max-width: 640px) 100vw, (max-width: 767px) 100vw, 100vw\" style=\"display:block;object-fit: cover; width: 100%; height: 100%; object-position: 50% 50%\" onload=\"this.classList.add(&quot;loaded&quot;)\" srcset=\"https:\/\/images.squarespace-cdn.com\/content\/v1\/5ad54fd4cef37247634a91ca\/1526175080395-ZCKDEP6Y970AD7L61L8W\/write-progress1.png?format=100w 100w, https:\/\/images.squarespace-cdn.com\/content\/v1\/5ad54fd4cef37247634a91ca\/1526175080395-ZCKDEP6Y970AD7L61L8W\/write-progress1.png?format=300w 300w, https:\/\/images.squarespace-cdn.com\/content\/v1\/5ad54fd4cef37247634a91ca\/1526175080395-ZCKDEP6Y970AD7L61L8W\/write-progress1.png?format=500w 500w, https:\/\/images.squarespace-cdn.com\/content\/v1\/5ad54fd4cef37247634a91ca\/1526175080395-ZCKDEP6Y970AD7L61L8W\/write-progress1.png?format=750w 750w, https:\/\/images.squarespace-cdn.com\/content\/v1\/5ad54fd4cef37247634a91ca\/1526175080395-ZCKDEP6Y970AD7L61L8W\/write-progress1.png?format=1000w 1000w, https:\/\/images.squarespace-cdn.com\/content\/v1\/5ad54fd4cef37247634a91ca\/1526175080395-ZCKDEP6Y970AD7L61L8W\/write-progress1.png?format=1500w 1500w, https:\/\/images.squarespace-cdn.com\/content\/v1\/5ad54fd4cef37247634a91ca\/1526175080395-ZCKDEP6Y970AD7L61L8W\/write-progress1.png?format=2500w 2500w\" loading=\"lazy\" decoding=\"async\" data-loader=\"sqs\"><\/p><\/div>\n<\/p><\/div>\n<p>            <\/button><\/p>\n<\/figure><\/div>\n<div class=\"sqs-html-content\">\n<p class=\"\" style=\"white-space:pre-wrap;\">What if you want to get more in-depth and use this as a progress bar? You can do that as well by leveraging the <em>PercentComplete<\/em>&nbsp;or <em>SecondsRemaining<\/em> parameter for longer running operations.&nbsp;<\/p>\n<p class=\"\" style=\"white-space:pre-wrap;\"><strong>Out-GridView:<\/strong><\/p>\n<p class=\"\" style=\"white-space:pre-wrap;\">Out-GridView is a cmdlet that can be used both to accept user input and display results. The parameters allow you to set it to single or multiple inputs. My only 2 complaints are that you can&#8217;t change the window size and it isn&#8217;t always obvious to users that you can ctl + click to select multiple if it is enabled. Here is a quick example how you could interactively kill a running process:<\/p>\n<pre><code>$RunningProcesses = Get-Process | Select-Object ProcessName, ID, CPU\n\n$ProcessToKill = $RunningProcesses | Out-GridView -Title \"Running Processes - Select a process to end\" -OutputMode Single\n\nStop-Process -Id $ProcessToKill.Id\n<\/code><\/pre>\n<\/div>\n<div\n        class=\"\n          image-block-outer-wrapper\n          layout-caption-hidden\n          design-layout-inline\n          combination-animation-none\n          individual-animation-none\n          individual-text-animation-none\n        \"\n        data-test=\"image-block-inline-outer-wrapper\"\n    ><\/p>\n<figure\n            class=\"\n              sqs-block-image-figure\n              intrinsic\n            \"\n            style=\"max-width:1453px;\"\n        ><\/p>\n<p>            <button\n                class=\"\n                  sqs-block-image-button\n                  lightbox\n                  \n          \n        \n                \"\n                data-description=\"\"\n                data-lightbox-theme=\"dark\"\n            ><br \/>\n              <span class=\"v6-visually-hidden\">View fullsize<\/span><\/p>\n<div\n              \n              \n              class=\"image-block-wrapper\"\n              data-animation-role=\"image\"\n              \n  \n\n          ><\/p>\n<div class=\"sqs-image-shape-container-element\n              \n          \n        \n              has-aspect-ratio\n            \" style=\"\n                position: relative;\n                \n                  padding-bottom:53.20027542114258%;\n                \n                overflow: hidden;-webkit-mask-image: -webkit-radial-gradient(white, black);\n              \"\n              ><\/p>\n<p>                  <img loading=\"lazy\" data-stretch=\"false\" src=\"https:\/\/images.squarespace-cdn.com\/content\/v1\/5ad54fd4cef37247634a91ca\/1526176096593-J9SRRFHOZ7I5IZ411K3L\/ogv.png\" data-image=\"https:\/\/images.squarespace-cdn.com\/content\/v1\/5ad54fd4cef37247634a91ca\/1526176096593-J9SRRFHOZ7I5IZ411K3L\/ogv.png\" data-image-dimensions=\"1453x773\" data-image-focal-point=\"0.5,0.5\" alt=\"ogv.png\" data-load=\"false\" elementtiming=\"system-image-block\" src=\"https:\/\/images.squarespace-cdn.com\/content\/v1\/5ad54fd4cef37247634a91ca\/1526176096593-J9SRRFHOZ7I5IZ411K3L\/ogv.png\" width=\"1453\" height=\"773\" alt=\"\" sizes=\"auto, (max-width: 640px) 100vw, (max-width: 767px) 100vw, 100vw\" style=\"display:block;object-fit: cover; width: 100%; height: 100%; object-position: 50% 50%\" onload=\"this.classList.add(&quot;loaded&quot;)\" srcset=\"https:\/\/images.squarespace-cdn.com\/content\/v1\/5ad54fd4cef37247634a91ca\/1526176096593-J9SRRFHOZ7I5IZ411K3L\/ogv.png?format=100w 100w, https:\/\/images.squarespace-cdn.com\/content\/v1\/5ad54fd4cef37247634a91ca\/1526176096593-J9SRRFHOZ7I5IZ411K3L\/ogv.png?format=300w 300w, https:\/\/images.squarespace-cdn.com\/content\/v1\/5ad54fd4cef37247634a91ca\/1526176096593-J9SRRFHOZ7I5IZ411K3L\/ogv.png?format=500w 500w, https:\/\/images.squarespace-cdn.com\/content\/v1\/5ad54fd4cef37247634a91ca\/1526176096593-J9SRRFHOZ7I5IZ411K3L\/ogv.png?format=750w 750w, https:\/\/images.squarespace-cdn.com\/content\/v1\/5ad54fd4cef37247634a91ca\/1526176096593-J9SRRFHOZ7I5IZ411K3L\/ogv.png?format=1000w 1000w, https:\/\/images.squarespace-cdn.com\/content\/v1\/5ad54fd4cef37247634a91ca\/1526176096593-J9SRRFHOZ7I5IZ411K3L\/ogv.png?format=1500w 1500w, https:\/\/images.squarespace-cdn.com\/content\/v1\/5ad54fd4cef37247634a91ca\/1526176096593-J9SRRFHOZ7I5IZ411K3L\/ogv.png?format=2500w 2500w\" loading=\"lazy\" decoding=\"async\" data-loader=\"sqs\"><\/p><\/div>\n<\/p><\/div>\n<p>            <\/button><\/p>\n<\/figure><\/div>\n<div class=\"sqs-html-content\">\n<p class=\"\" style=\"white-space:pre-wrap;\"><em>Note: If you are only displaying results you will want to use the Wait parameter or you will run into issues with your console trying to end before the window is displayed.&nbsp;<\/em><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p style=\"white-space: pre-wrap;\">I&#8217;ve said it once and I&#8217;ll say it again, just because you can create a fancy GUI to run your tool doesn&#8217;t mean you need to. There are a number of built in alternatives that allow you to accept user input, show command progress,&nbsp;and display results in a way that is fully supported and doesn&#8217;t require you spending time building out an entire user interface. Today we&#8217;re going to look at 3 commands that you can leverage to achieve this.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-16","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Built in alternatives to building a custom GUI - Nathan Kasco - Blog<\/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:\/\/blog.nkasco.com\/wordpress\/index.php\/2018\/05\/13\/2018-5-10-built-in-alternatives-to-building-a-custom-gui\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Built in alternatives to building a custom GUI - Nathan Kasco - Blog\" \/>\n<meta property=\"og:description\" content=\"I&#039;ve said it once and I&#039;ll say it again, just because you can create a fancy GUI to run your tool doesn&#039;t mean you need to. There are a number of built in alternatives that allow you to accept user input, show command progress,&nbsp;and display results in a way that is fully supported and doesn&#039;t require you spending time building out an entire user interface. Today we&#039;re going to look at 3 commands that you can leverage to achieve this.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2018\/05\/13\/2018-5-10-built-in-alternatives-to-building-a-custom-gui\/\" \/>\n<meta property=\"og:site_name\" content=\"Nathan Kasco - Blog\" \/>\n<meta property=\"article:published_time\" content=\"2018-05-13T11:00:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/images.squarespace-cdn.com\/content\/v1\/5ad54fd4cef37247634a91ca\/1526176593986-TCNIYRDIM1OFLHUN9LP8\/Show-Command.png\" \/>\n<meta name=\"author\" content=\"Nate Kasco\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@Bu5yGiraffe\" \/>\n<meta name=\"twitter:site\" content=\"@Bu5yGiraffe\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Nate Kasco\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2018\/05\/13\/2018-5-10-built-in-alternatives-to-building-a-custom-gui\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2018\/05\/13\/2018-5-10-built-in-alternatives-to-building-a-custom-gui\/\"},\"author\":{\"name\":\"Nate Kasco\",\"@id\":\"https:\/\/blog.nkasco.com\/wordpress\/#\/schema\/person\/1dfd694a2ed094a43a37dc6882c65eb3\"},\"headline\":\"Built in alternatives to building a custom GUI\",\"datePublished\":\"2018-05-13T11:00:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2018\/05\/13\/2018-5-10-built-in-alternatives-to-building-a-custom-gui\/\"},\"wordCount\":417,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/blog.nkasco.com\/wordpress\/#\/schema\/person\/1dfd694a2ed094a43a37dc6882c65eb3\"},\"image\":{\"@id\":\"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2018\/05\/13\/2018-5-10-built-in-alternatives-to-building-a-custom-gui\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/images.squarespace-cdn.com\/content\/v1\/5ad54fd4cef37247634a91ca\/1526176593986-TCNIYRDIM1OFLHUN9LP8\/Show-Command.png\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2018\/05\/13\/2018-5-10-built-in-alternatives-to-building-a-custom-gui\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2018\/05\/13\/2018-5-10-built-in-alternatives-to-building-a-custom-gui\/\",\"url\":\"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2018\/05\/13\/2018-5-10-built-in-alternatives-to-building-a-custom-gui\/\",\"name\":\"Built in alternatives to building a custom GUI - Nathan Kasco - Blog\",\"isPartOf\":{\"@id\":\"https:\/\/blog.nkasco.com\/wordpress\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2018\/05\/13\/2018-5-10-built-in-alternatives-to-building-a-custom-gui\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2018\/05\/13\/2018-5-10-built-in-alternatives-to-building-a-custom-gui\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/images.squarespace-cdn.com\/content\/v1\/5ad54fd4cef37247634a91ca\/1526176593986-TCNIYRDIM1OFLHUN9LP8\/Show-Command.png\",\"datePublished\":\"2018-05-13T11:00:00+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2018\/05\/13\/2018-5-10-built-in-alternatives-to-building-a-custom-gui\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2018\/05\/13\/2018-5-10-built-in-alternatives-to-building-a-custom-gui\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2018\/05\/13\/2018-5-10-built-in-alternatives-to-building-a-custom-gui\/#primaryimage\",\"url\":\"https:\/\/images.squarespace-cdn.com\/content\/v1\/5ad54fd4cef37247634a91ca\/1526176593986-TCNIYRDIM1OFLHUN9LP8\/Show-Command.png\",\"contentUrl\":\"https:\/\/images.squarespace-cdn.com\/content\/v1\/5ad54fd4cef37247634a91ca\/1526176593986-TCNIYRDIM1OFLHUN9LP8\/Show-Command.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2018\/05\/13\/2018-5-10-built-in-alternatives-to-building-a-custom-gui\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/blog.nkasco.com\/wordpress\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Built in alternatives to building a custom GUI\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.nkasco.com\/wordpress\/#website\",\"url\":\"https:\/\/blog.nkasco.com\/wordpress\/\",\"name\":\"Nathan Kasco - Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/blog.nkasco.com\/wordpress\/#\/schema\/person\/1dfd694a2ed094a43a37dc6882c65eb3\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.nkasco.com\/wordpress\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/blog.nkasco.com\/wordpress\/#\/schema\/person\/1dfd694a2ed094a43a37dc6882c65eb3\",\"name\":\"Nate Kasco\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.nkasco.com\/wordpress\/wp-content\/uploads\/2024\/03\/cropped-logo.png\",\"url\":\"https:\/\/blog.nkasco.com\/wordpress\/wp-content\/uploads\/2024\/03\/cropped-logo.png\",\"contentUrl\":\"https:\/\/blog.nkasco.com\/wordpress\/wp-content\/uploads\/2024\/03\/cropped-logo.png\",\"width\":200,\"height\":200,\"caption\":\"Nate Kasco\"},\"logo\":{\"@id\":\"https:\/\/blog.nkasco.com\/wordpress\/wp-content\/uploads\/2024\/03\/cropped-logo.png\"},\"sameAs\":[\"http:\/\/nkascocom.nk\/wordpress\",\"https:\/\/x.com\/Bu5yGiraffe\"],\"url\":\"https:\/\/blog.nkasco.com\/wordpress\/index.php\/author\/nate\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Built in alternatives to building a custom GUI - Nathan Kasco - Blog","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:\/\/blog.nkasco.com\/wordpress\/index.php\/2018\/05\/13\/2018-5-10-built-in-alternatives-to-building-a-custom-gui\/","og_locale":"en_US","og_type":"article","og_title":"Built in alternatives to building a custom GUI - Nathan Kasco - Blog","og_description":"I've said it once and I'll say it again, just because you can create a fancy GUI to run your tool doesn't mean you need to. There are a number of built in alternatives that allow you to accept user input, show command progress,&nbsp;and display results in a way that is fully supported and doesn't require you spending time building out an entire user interface. Today we're going to look at 3 commands that you can leverage to achieve this.","og_url":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2018\/05\/13\/2018-5-10-built-in-alternatives-to-building-a-custom-gui\/","og_site_name":"Nathan Kasco - Blog","article_published_time":"2018-05-13T11:00:00+00:00","og_image":[{"url":"https:\/\/images.squarespace-cdn.com\/content\/v1\/5ad54fd4cef37247634a91ca\/1526176593986-TCNIYRDIM1OFLHUN9LP8\/Show-Command.png","type":"","width":"","height":""}],"author":"Nate Kasco","twitter_card":"summary_large_image","twitter_creator":"@Bu5yGiraffe","twitter_site":"@Bu5yGiraffe","twitter_misc":{"Written by":"Nate Kasco","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2018\/05\/13\/2018-5-10-built-in-alternatives-to-building-a-custom-gui\/#article","isPartOf":{"@id":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2018\/05\/13\/2018-5-10-built-in-alternatives-to-building-a-custom-gui\/"},"author":{"name":"Nate Kasco","@id":"https:\/\/blog.nkasco.com\/wordpress\/#\/schema\/person\/1dfd694a2ed094a43a37dc6882c65eb3"},"headline":"Built in alternatives to building a custom GUI","datePublished":"2018-05-13T11:00:00+00:00","mainEntityOfPage":{"@id":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2018\/05\/13\/2018-5-10-built-in-alternatives-to-building-a-custom-gui\/"},"wordCount":417,"commentCount":0,"publisher":{"@id":"https:\/\/blog.nkasco.com\/wordpress\/#\/schema\/person\/1dfd694a2ed094a43a37dc6882c65eb3"},"image":{"@id":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2018\/05\/13\/2018-5-10-built-in-alternatives-to-building-a-custom-gui\/#primaryimage"},"thumbnailUrl":"https:\/\/images.squarespace-cdn.com\/content\/v1\/5ad54fd4cef37247634a91ca\/1526176593986-TCNIYRDIM1OFLHUN9LP8\/Show-Command.png","inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/blog.nkasco.com\/wordpress\/index.php\/2018\/05\/13\/2018-5-10-built-in-alternatives-to-building-a-custom-gui\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2018\/05\/13\/2018-5-10-built-in-alternatives-to-building-a-custom-gui\/","url":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2018\/05\/13\/2018-5-10-built-in-alternatives-to-building-a-custom-gui\/","name":"Built in alternatives to building a custom GUI - Nathan Kasco - Blog","isPartOf":{"@id":"https:\/\/blog.nkasco.com\/wordpress\/#website"},"primaryImageOfPage":{"@id":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2018\/05\/13\/2018-5-10-built-in-alternatives-to-building-a-custom-gui\/#primaryimage"},"image":{"@id":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2018\/05\/13\/2018-5-10-built-in-alternatives-to-building-a-custom-gui\/#primaryimage"},"thumbnailUrl":"https:\/\/images.squarespace-cdn.com\/content\/v1\/5ad54fd4cef37247634a91ca\/1526176593986-TCNIYRDIM1OFLHUN9LP8\/Show-Command.png","datePublished":"2018-05-13T11:00:00+00:00","breadcrumb":{"@id":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2018\/05\/13\/2018-5-10-built-in-alternatives-to-building-a-custom-gui\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.nkasco.com\/wordpress\/index.php\/2018\/05\/13\/2018-5-10-built-in-alternatives-to-building-a-custom-gui\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2018\/05\/13\/2018-5-10-built-in-alternatives-to-building-a-custom-gui\/#primaryimage","url":"https:\/\/images.squarespace-cdn.com\/content\/v1\/5ad54fd4cef37247634a91ca\/1526176593986-TCNIYRDIM1OFLHUN9LP8\/Show-Command.png","contentUrl":"https:\/\/images.squarespace-cdn.com\/content\/v1\/5ad54fd4cef37247634a91ca\/1526176593986-TCNIYRDIM1OFLHUN9LP8\/Show-Command.png"},{"@type":"BreadcrumbList","@id":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2018\/05\/13\/2018-5-10-built-in-alternatives-to-building-a-custom-gui\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.nkasco.com\/wordpress\/"},{"@type":"ListItem","position":2,"name":"Built in alternatives to building a custom GUI"}]},{"@type":"WebSite","@id":"https:\/\/blog.nkasco.com\/wordpress\/#website","url":"https:\/\/blog.nkasco.com\/wordpress\/","name":"Nathan Kasco - Blog","description":"","publisher":{"@id":"https:\/\/blog.nkasco.com\/wordpress\/#\/schema\/person\/1dfd694a2ed094a43a37dc6882c65eb3"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.nkasco.com\/wordpress\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/blog.nkasco.com\/wordpress\/#\/schema\/person\/1dfd694a2ed094a43a37dc6882c65eb3","name":"Nate Kasco","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.nkasco.com\/wordpress\/wp-content\/uploads\/2024\/03\/cropped-logo.png","url":"https:\/\/blog.nkasco.com\/wordpress\/wp-content\/uploads\/2024\/03\/cropped-logo.png","contentUrl":"https:\/\/blog.nkasco.com\/wordpress\/wp-content\/uploads\/2024\/03\/cropped-logo.png","width":200,"height":200,"caption":"Nate Kasco"},"logo":{"@id":"https:\/\/blog.nkasco.com\/wordpress\/wp-content\/uploads\/2024\/03\/cropped-logo.png"},"sameAs":["http:\/\/nkascocom.nk\/wordpress","https:\/\/x.com\/Bu5yGiraffe"],"url":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/author\/nate\/"}]}},"_links":{"self":[{"href":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/16","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=16"}],"version-history":[{"count":0,"href":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/16\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=16"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=16"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=16"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}