{"id":9154,"date":"2022-10-19T12:54:11","date_gmt":"2022-10-19T16:54:11","guid":{"rendered":"https:\/\/jdhitsolutions.com\/blog\/?p=9154"},"modified":"2022-10-19T12:54:17","modified_gmt":"2022-10-19T16:54:17","slug":"a-wpf-countdown-timer","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/9154\/a-wpf-countdown-timer\/","title":{"rendered":"A WPF Countdown Timer"},"content":{"rendered":"\n<p>Last year I released a PowerShell module called <a href=\"https:\/\/github.com\/jdhitsolutions\/PSClock\" target=\"_blank\" rel=\"noreferrer noopener\">PSClock<\/a>. The module contains a command to create a transparent WPF form displaying a clock. Shortly after, someone posted a request for a countdown timer. Not an unreasonable request and one I finally got around to implementing. However, I already had a module with a number of timer and countdown-related commands called <a href=\"https:\/\/github.com\/jdhitsolutions\/PSTimers\" target=\"_blank\" rel=\"noreferrer noopener\">PSTimers<\/a> I had been thinking of a WPF-based timer, so this solved two problems.<\/p>\n\n\n\n<p>I've published v1.0.1 of the PSTimers module to the PowerShell Gallery with a new command, <a href=\"https:\/\/bit.ly\/3T5ntz1\" target=\"_blank\" rel=\"noreferrer noopener\">Start-PSCountdownTimer<\/a>. This command is based on <a href=\"https:\/\/bit.ly\/3ES92Hh\" target=\"_blank\" rel=\"noreferrer noopener\">Start-PSClock<\/a> and will launch a WPF-based countdown timer. The timer's appearance and behavior is customizable via parameters.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"powershell\" class=\"language-powershell\">Start-PSCountdownTimer -Seconds 300 -FontSize 48 -Color Green -Message \"The PowerShell magic begins in \"<\/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\/10\/countdowntimer.png\"><img loading=\"lazy\" decoding=\"async\" width=\"987\" height=\"164\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/10\/countdowntimer.png\" alt=\"pscountdown timer\" class=\"wp-image-9155\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/10\/countdowntimer.png 987w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/10\/countdowntimer-300x50.png 300w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/10\/countdowntimer-768x128.png 768w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/10\/countdowntimer-850x141.png 850w\" sizes=\"auto, (max-width: 987px) 100vw, 987px\" \/><\/a><\/figure>\n\n\n\n<p>At 50 seconds, the font color will change to Yellow, and at 30 seconds, to Red. These settings can also be set with parameters.<\/p>\n\n\n\n<p>The timer uses a synchronized hashtable.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"powershell\" class=\"language-powershell\">PS C:\\> $pscountDownClock\n\nName                           Value\n----                           -----\nFontStyle                      Normal\nWarning                        30\nStartingPosition\nAlertColor                     Yellow\nWarningColor                   Red\nFontWeight                     Normal\nMessage                        The PowerShell magic begins in\nOnTop                          False\nSeconds                        300\nFontSize                       48\nCurrentPosition                {276, 964}\nRunning                        True\nRunspace                       System.Management.Automation.Runspaces.LocalRunspace\nAlert                          50\nColor                          Green\nStarted                        10\/19\/2022 12:35:00 PM\nFontFamily                     Segoi UI<\/code><\/pre>\n\n\n\n<p>After the clock is running, you can modify the hashtable to adjust the WPF form.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"powershell\" class=\"language-powershell\">PS C:\\> $PScountdownclock.fontsize = 60\nPS C:\\> $PScountdownclock.color = \"chartreuse\"<\/code><\/pre>\n\n\n\n<p>If you want to stop the clock early you can run Stop-PSCountdownTimer or set <code>$PSCountdownClock.Running<\/code> to $False.<\/p>\n\n\n\n<p>The countdown timer runs in a separate runspace, so your prompt isn't blocked. But this also means that it can't easily interact with the PowerShell session that launched it. If you would like something to happen at the end of the timer, I suggest writing an automation script around the command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"powershell\" class=\"language-powershell\">&lt;#\nA proof-of-concept script that adds an action at the end of the PSCountdownTimer\n#>\nStart-PSCountdownTimer -seconds 60 -message \"The PowerShell magic begins in \" -FontSize 64 -Color SpringGreen\nDo {\n    Start-Sleep -Seconds 1\n} While ($PScountdownclock.Running)\nClear-Host\nWrite-Host \"Are you ready for some PowerShell?\" -ForegroundColor magenta -BackgroundColor gray\n\nAdd-Type -AssemblyName PresentationCore\n$filename = \"c:\\work\\01-Start.mp3\"\n#the media player launches with no UI. Use the object's methods to control it.\n$global:mediaplayer = New-Object system.windows.media.mediaplayer\n$global:mediaPlayer.Open($filename)\n$global:mediaplayer.Play()\n\n# mediaplayer.stop()\n# $mediaplayer.close()<\/code><\/pre>\n\n\n\n<p>I think I'll start using this in my classes and conference presentations. <\/p>\n\n\n\n<p>The module should work cross-platform, but the WPF-based commands require Windows. If you try it out, I'd love to know what you think.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last year I released a PowerShell module called PSClock. The module contains a command to create a transparent WPF form displaying a clock. Shortly after, someone posted a request for a countdown timer. Not an unreasonable request and one I finally got around to implementing. However, I already had a module with a number of&#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: A WPF-based #PowerShell countdown timer","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,8],"tags":[674,221,534,675,379],"class_list":["post-9154","post","type-post","status-publish","format-standard","hentry","category-powershell","category-scripting","tag-countdown","tag-module","tag-powershell","tag-timer","tag-wpf"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>A WPF Countdown Timer &#8226; The Lonely Administrator<\/title>\n<meta name=\"description\" content=\"I&#039;ve published an update to my PSTimers module with a new command that creates a WPF-based countdown timer. Great for presentations or classes.\" \/>\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\/9154\/a-wpf-countdown-timer\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"A WPF Countdown Timer &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"I&#039;ve published an update to my PSTimers module with a new command that creates a WPF-based countdown timer. Great for presentations or classes.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/9154\/a-wpf-countdown-timer\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2022-10-19T16:54:11+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-10-19T16:54:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/10\/countdowntimer.png\" \/>\n<meta name=\"author\" content=\"Jeffery Hicks\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/10\/countdowntimer-small.png\" \/>\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=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/9154\\\/a-wpf-countdown-timer\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/9154\\\/a-wpf-countdown-timer\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"A WPF Countdown Timer\",\"datePublished\":\"2022-10-19T16:54:11+00:00\",\"dateModified\":\"2022-10-19T16:54:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/9154\\\/a-wpf-countdown-timer\\\/\"},\"wordCount\":267,\"commentCount\":5,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/9154\\\/a-wpf-countdown-timer\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/10\\\/countdowntimer.png\",\"keywords\":[\"Countdown\",\"module\",\"PowerShell\",\"Timer\",\"WPF\"],\"articleSection\":[\"PowerShell\",\"Scripting\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/9154\\\/a-wpf-countdown-timer\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/9154\\\/a-wpf-countdown-timer\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/9154\\\/a-wpf-countdown-timer\\\/\",\"name\":\"A WPF Countdown Timer &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/9154\\\/a-wpf-countdown-timer\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/9154\\\/a-wpf-countdown-timer\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/10\\\/countdowntimer.png\",\"datePublished\":\"2022-10-19T16:54:11+00:00\",\"dateModified\":\"2022-10-19T16:54:17+00:00\",\"description\":\"I've published an update to my PSTimers module with a new command that creates a WPF-based countdown timer. Great for presentations or classes.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/9154\\\/a-wpf-countdown-timer\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/9154\\\/a-wpf-countdown-timer\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/9154\\\/a-wpf-countdown-timer\\\/#primaryimage\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/10\\\/countdowntimer.png\",\"contentUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/10\\\/countdowntimer.png\",\"width\":987,\"height\":164},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/9154\\\/a-wpf-countdown-timer\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"PowerShell\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/powershell\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"A WPF Countdown Timer\"}]},{\"@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":"A WPF Countdown Timer &#8226; The Lonely Administrator","description":"I've published an update to my PSTimers module with a new command that creates a WPF-based countdown timer. Great for presentations or classes.","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\/9154\/a-wpf-countdown-timer\/","og_locale":"en_US","og_type":"article","og_title":"A WPF Countdown Timer &#8226; The Lonely Administrator","og_description":"I've published an update to my PSTimers module with a new command that creates a WPF-based countdown timer. Great for presentations or classes.","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/9154\/a-wpf-countdown-timer\/","og_site_name":"The Lonely Administrator","article_published_time":"2022-10-19T16:54:11+00:00","article_modified_time":"2022-10-19T16:54:17+00:00","og_image":[{"url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/10\/countdowntimer.png","type":"","width":"","height":""}],"author":"Jeffery Hicks","twitter_card":"summary_large_image","twitter_image":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/10\/countdowntimer-small.png","twitter_creator":"@JeffHicks","twitter_site":"@JeffHicks","twitter_misc":{"Written by":"Jeffery Hicks","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/9154\/a-wpf-countdown-timer\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/9154\/a-wpf-countdown-timer\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"A WPF Countdown Timer","datePublished":"2022-10-19T16:54:11+00:00","dateModified":"2022-10-19T16:54:17+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/9154\/a-wpf-countdown-timer\/"},"wordCount":267,"commentCount":5,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/9154\/a-wpf-countdown-timer\/#primaryimage"},"thumbnailUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/10\/countdowntimer.png","keywords":["Countdown","module","PowerShell","Timer","WPF"],"articleSection":["PowerShell","Scripting"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/9154\/a-wpf-countdown-timer\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/9154\/a-wpf-countdown-timer\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/9154\/a-wpf-countdown-timer\/","name":"A WPF Countdown Timer &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/9154\/a-wpf-countdown-timer\/#primaryimage"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/9154\/a-wpf-countdown-timer\/#primaryimage"},"thumbnailUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/10\/countdowntimer.png","datePublished":"2022-10-19T16:54:11+00:00","dateModified":"2022-10-19T16:54:17+00:00","description":"I've published an update to my PSTimers module with a new command that creates a WPF-based countdown timer. Great for presentations or classes.","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/9154\/a-wpf-countdown-timer\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/9154\/a-wpf-countdown-timer\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/9154\/a-wpf-countdown-timer\/#primaryimage","url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/10\/countdowntimer.png","contentUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/10\/countdowntimer.png","width":987,"height":164},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/9154\/a-wpf-countdown-timer\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"PowerShell","item":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},{"@type":"ListItem","position":2,"name":"A WPF Countdown Timer"}]},{"@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":8684,"url":"https:\/\/jdhitsolutions.com\/blog\/wpf\/8684\/creating-a-powershell-clock\/","url_meta":{"origin":9154,"position":0},"title":"Creating a PowerShell Clock","author":"Jeffery Hicks","date":"November 9, 2021","format":false,"excerpt":"I've published a new project to the PowerShell Gallery. This is something that I needed, and maybe you do as well. Even though I have the typical clock running in the Windows taskbar, I have an ultrawide monitor so it isn't always easy to read. I had been running the\u2026","rel":"","context":"In &quot;Scripting&quot;","block_context":{"text":"Scripting","link":"https:\/\/jdhitsolutions.com\/blog\/category\/scripting\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/11\/sample-2.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":6531,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6531\/a-better-powershell-wpf-grid-viewer\/","url_meta":{"origin":9154,"position":1},"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":4989,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4989\/remote-powershell-ise-connections-in-action\/","url_meta":{"origin":9154,"position":2},"title":"Remote PowerShell ISE Connections in Action","author":"Jeffery Hicks","date":"July 14, 2016","format":false,"excerpt":"I've written a few times about my PowerShell module that makes it easier to create remote tabs in the PowerShell ISE. The module, ISERemoteTab, is available in the PowerShell gallery. I've also created a short video that demonstrates how to use it, especially the WPF form. I have a few\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":5816,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5816\/a-powershell-input-tool\/","url_meta":{"origin":9154,"position":3},"title":"A PowerShell Input Tool","author":"Jeffery Hicks","date":"December 7, 2017","format":false,"excerpt":"In PowerShell, the primary means to get interactive input from a user is with the Read-Host cmdlet. There's nothing wrong with it but sometimes if you are using it in a graphical tool like the PowerShell ISE or VS Code you may not realize you are being prompted. Or perhaps\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\/2017\/12\/image_thumb-2.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/12\/image_thumb-2.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/12\/image_thumb-2.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":5806,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5806\/a-powershell-countdown-timer\/","url_meta":{"origin":9154,"position":4},"title":"A PowerShell Countdown Timer","author":"Jeffery Hicks","date":"December 6, 2017","format":false,"excerpt":"The other day, during one of the monthly #PSTweetChat sessions, I exchanged some tweets with Joshua King. We got on the topic of countdown timers and he shared some code he uses for his YouTube channel. The command creates a progress bar and counts down, displaying some humorous messages along\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":7865,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7865\/tracing-powershell-with-wpf\/","url_meta":{"origin":9154,"position":5},"title":"Tracing PowerShell with WPF","author":"Jeffery Hicks","date":"November 11, 2020","format":false,"excerpt":"Back in my VBScript days, I had a script that would use Internet Explorer as a trace window. My script could run and messages would be written to an IE window. This was a handy way of separating debug or trace messages from the command output. When PowerShell came along\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\/11\/trace-1.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/11\/trace-1.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/11\/trace-1.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/11\/trace-1.png?resize=700%2C400&ssl=1 2x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/9154","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=9154"}],"version-history":[{"count":1,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/9154\/revisions"}],"predecessor-version":[{"id":9157,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/9154\/revisions\/9157"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=9154"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=9154"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=9154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}