{"id":8684,"date":"2021-11-09T10:21:54","date_gmt":"2021-11-09T15:21:54","guid":{"rendered":"https:\/\/jdhitsolutions.com\/blog\/?p=8684"},"modified":"2021-11-09T10:21:57","modified_gmt":"2021-11-09T15:21:57","slug":"creating-a-powershell-clock","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/wpf\/8684\/creating-a-powershell-clock\/","title":{"rendered":"Creating a PowerShell Clock"},"content":{"rendered":"\n<p>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 xclock app from WSL which was nice. But realized what I really wanted was a WPF-based clock that would display a formatted date-time string on my desktop.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/11\/sample-2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"460\" height=\"128\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/11\/sample-2.png\" alt=\"\" class=\"wp-image-8685\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/11\/sample-2.png 460w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/11\/sample-2-300x83.png 300w\" sizes=\"auto, (max-width: 460px) 100vw, 460px\" \/><\/a><\/figure>\n\n\n\n<p>The xclock application allows you to customize the DateTime format and I wanted the same option.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/11\/sample-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"504\" height=\"139\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/11\/sample-1.png\" alt=\"\" class=\"wp-image-8687\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/11\/sample-1.png 504w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/11\/sample-1-300x83.png 300w\" sizes=\"auto, (max-width: 504px) 100vw, 504px\" \/><\/a><\/figure>\n\n\n\n<p>I spent a day writing the <a href=\"https:\/\/github.com\/jdhitsolutions\/PSClock\" target=\"_blank\" rel=\"noreferrer noopener\">PSClock module<\/a> which you can install from the PowerShell Gallery.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"powershell\" class=\"language-powershell\">Install-Module PSClock<\/code><\/pre>\n\n\n\n<p>The module will run in both Windows PowerShell and PowerShell 7 on Windows. The module will also install the ThreadJob module if it isn't already installed.<\/p>\n\n\n\n<p>The <a href=\"https:\/\/github.com\/jdhitsolutions\/PSClock\/blob\/main\/docs\/Start-PSClock.md\" target=\"_blank\" rel=\"noreferrer noopener\">Start-PSClock<\/a> command lets you create a WPF form that displays a formatted DateTime string in a transparent form. The form runs in a separate PowerShell runspace. You can control the form through a synchronized hashtable. Although I use the <a href=\"https:\/\/github.com\/jdhitsolutions\/PSClock\/blob\/main\/docs\/Set-PSClock.md\" target=\"_blank\" rel=\"noreferrer noopener\">Set-PSClock<\/a> function which abstracts this process.<\/p>\n\n\n\n<p>Normally, I'd write about the technical details here. Instead, I wrote a design document which I encourage you to read <a href=\"https:\/\/github.com\/jdhitsolutions\/PSClock\/blob\/main\/Design.md\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>, as well as poking through the code on GitHub. I'd also recommend looking at the project's <a href=\"https:\/\/github.com\/jdhitsolutions\/PSClock\/blob\/main\/README.md\" target=\"_blank\" rel=\"noreferrer noopener\">README <\/a>file.<\/p>\n\n\n\n<p>I hope you'll give it a try and let me know what you think.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;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&#8217;t always easy to read. I had been running the xclock app from WSL which&#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: Creating a #PowerShell WPF Clock","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":[8,518],"tags":[221,534,661,540,379],"class_list":["post-8684","post","type-post","status-publish","format-standard","hentry","category-scripting","category-wpf","tag-module","tag-powershell","tag-runspace","tag-scripting","tag-wpf"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Creating a PowerShell Clock &#8226; The Lonely Administrator<\/title>\n<meta name=\"description\" content=\"Here&#039;s a new PowerShell project that creates a WPF script running in a runspace to display a digital clock on your Windows desktop.\" \/>\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\/wpf\/8684\/creating-a-powershell-clock\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Creating a PowerShell Clock &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"Here&#039;s a new PowerShell project that creates a WPF script running in a runspace to display a digital clock on your Windows desktop.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/wpf\/8684\/creating-a-powershell-clock\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2021-11-09T15:21:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-11-09T15:21:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/11\/sample-2.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=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wpf\\\/8684\\\/creating-a-powershell-clock\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wpf\\\/8684\\\/creating-a-powershell-clock\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"Creating a PowerShell Clock\",\"datePublished\":\"2021-11-09T15:21:54+00:00\",\"dateModified\":\"2021-11-09T15:21:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wpf\\\/8684\\\/creating-a-powershell-clock\\\/\"},\"wordCount\":244,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wpf\\\/8684\\\/creating-a-powershell-clock\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/sample-2.png\",\"keywords\":[\"module\",\"PowerShell\",\"runspace\",\"Scripting\",\"WPF\"],\"articleSection\":[\"Scripting\",\"WPF\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wpf\\\/8684\\\/creating-a-powershell-clock\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wpf\\\/8684\\\/creating-a-powershell-clock\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wpf\\\/8684\\\/creating-a-powershell-clock\\\/\",\"name\":\"Creating a PowerShell Clock &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wpf\\\/8684\\\/creating-a-powershell-clock\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wpf\\\/8684\\\/creating-a-powershell-clock\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/sample-2.png\",\"datePublished\":\"2021-11-09T15:21:54+00:00\",\"dateModified\":\"2021-11-09T15:21:57+00:00\",\"description\":\"Here's a new PowerShell project that creates a WPF script running in a runspace to display a digital clock on your Windows desktop.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wpf\\\/8684\\\/creating-a-powershell-clock\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wpf\\\/8684\\\/creating-a-powershell-clock\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wpf\\\/8684\\\/creating-a-powershell-clock\\\/#primaryimage\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/sample-2.png\",\"contentUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/11\\\/sample-2.png\",\"width\":460,\"height\":128},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wpf\\\/8684\\\/creating-a-powershell-clock\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"WPF\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/wpf\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Creating a PowerShell Clock\"}]},{\"@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":"Creating a PowerShell Clock &#8226; The Lonely Administrator","description":"Here's a new PowerShell project that creates a WPF script running in a runspace to display a digital clock on your Windows desktop.","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\/wpf\/8684\/creating-a-powershell-clock\/","og_locale":"en_US","og_type":"article","og_title":"Creating a PowerShell Clock &#8226; The Lonely Administrator","og_description":"Here's a new PowerShell project that creates a WPF script running in a runspace to display a digital clock on your Windows desktop.","og_url":"https:\/\/jdhitsolutions.com\/blog\/wpf\/8684\/creating-a-powershell-clock\/","og_site_name":"The Lonely Administrator","article_published_time":"2021-11-09T15:21:54+00:00","article_modified_time":"2021-11-09T15:21:57+00:00","og_image":[{"url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/11\/sample-2.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":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jdhitsolutions.com\/blog\/wpf\/8684\/creating-a-powershell-clock\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/wpf\/8684\/creating-a-powershell-clock\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"Creating a PowerShell Clock","datePublished":"2021-11-09T15:21:54+00:00","dateModified":"2021-11-09T15:21:57+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/wpf\/8684\/creating-a-powershell-clock\/"},"wordCount":244,"commentCount":3,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/wpf\/8684\/creating-a-powershell-clock\/#primaryimage"},"thumbnailUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/11\/sample-2.png","keywords":["module","PowerShell","runspace","Scripting","WPF"],"articleSection":["Scripting","WPF"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/wpf\/8684\/creating-a-powershell-clock\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/wpf\/8684\/creating-a-powershell-clock\/","url":"https:\/\/jdhitsolutions.com\/blog\/wpf\/8684\/creating-a-powershell-clock\/","name":"Creating a PowerShell Clock &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/wpf\/8684\/creating-a-powershell-clock\/#primaryimage"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/wpf\/8684\/creating-a-powershell-clock\/#primaryimage"},"thumbnailUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/11\/sample-2.png","datePublished":"2021-11-09T15:21:54+00:00","dateModified":"2021-11-09T15:21:57+00:00","description":"Here's a new PowerShell project that creates a WPF script running in a runspace to display a digital clock on your Windows desktop.","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/wpf\/8684\/creating-a-powershell-clock\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/wpf\/8684\/creating-a-powershell-clock\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jdhitsolutions.com\/blog\/wpf\/8684\/creating-a-powershell-clock\/#primaryimage","url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/11\/sample-2.png","contentUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/11\/sample-2.png","width":460,"height":128},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/wpf\/8684\/creating-a-powershell-clock\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"WPF","item":"https:\/\/jdhitsolutions.com\/blog\/category\/wpf\/"},{"@type":"ListItem","position":2,"name":"Creating a PowerShell Clock"}]},{"@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":9154,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/9154\/a-wpf-countdown-timer\/","url_meta":{"origin":8684,"position":0},"title":"A WPF Countdown Timer","author":"Jeffery Hicks","date":"October 19, 2022","format":false,"excerpt":"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\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"pscountdown timer","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/10\/countdowntimer.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/10\/countdowntimer.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/10\/countdowntimer.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/10\/countdowntimer.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":6879,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6879\/the-powershell-magic-8-ball\/","url_meta":{"origin":8684,"position":1},"title":"The PowerShell Magic 8 Ball","author":"Jeffery Hicks","date":"October 28, 2019","format":false,"excerpt":"[I updated this article to reflect minor changes in the code and the release of PowerShell 7. This article was originally published 28 October, 2019]. Last year I shared some PowerShell code on Twitter about this time of year. I have a short script that uses Windows Presentation Foundation (WPF)\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\/10\/8balloracle-2_thumb.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/10\/8balloracle-2_thumb.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/10\/8balloracle-2_thumb.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/10\/8balloracle-2_thumb.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":6035,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6035\/making-short-links-long-with-powershell-and-wpf\/","url_meta":{"origin":8684,"position":2},"title":"Making Short Links Long with PowerShell and WPF","author":"Jeffery Hicks","date":"July 9, 2018","format":false,"excerpt":"Sometimes, when I have nothing better to do, I kill some time giving Todd Klindt and Shane Young a hard time during their podcast. You should join me sometime. Anyway, during a recent show Todd mentioned a bit of PowerShell code he put together to resolve short links. You see\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\/2018\/07\/image_thumb-1.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/07\/image_thumb-1.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/07\/image_thumb-1.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/07\/image_thumb-1.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":8871,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8871\/more-colorful-fun-with-powershell\/","url_meta":{"origin":8684,"position":3},"title":"More Colorful Fun with PowerShell","author":"Jeffery Hicks","date":"February 14, 2022","format":false,"excerpt":"In my last Friday Fun post, I shared some PowerShell code for displaying [System.Drawing.Color] values from a console using ANSI escape sequences. After I published the article, I realized what I really wanted was a color palette display that wouldn't be affected by the console background. A Windows Presentation Foundation\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\/2022\/02\/textbox-background.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/textbox-background.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/textbox-background.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2022\/02\/textbox-background.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":5816,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5816\/a-powershell-input-tool\/","url_meta":{"origin":8684,"position":4},"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":4980,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell-ise\/4980\/formal-remote-ise-connections\/","url_meta":{"origin":8684,"position":5},"title":"Formal Remote ISE Connections","author":"Jeffery Hicks","date":"May 3, 2016","format":false,"excerpt":"I have updated my PowerShell tools that make it easier to open up a remote tab in the PowerShell ISE.\u00a0 The standard approach is limited and doesn't allow for things like using SSL or different ports.\u00a0 I have had the ISERemoteTab project up on GitHub for awhile. I recently added\u2026","rel":"","context":"In &quot;PowerShell ISE&quot;","block_context":{"text":"PowerShell ISE","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell-ise\/"},"img":{"alt_text":"remoteIsetab","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/05\/remoteIsetab_thumb.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/05\/remoteIsetab_thumb.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/05\/remoteIsetab_thumb.png?resize=525%2C300 1.5x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/8684","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=8684"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/8684\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=8684"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=8684"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=8684"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}