{"id":1849,"date":"2011-11-25T09:00:55","date_gmt":"2011-11-25T14:00:55","guid":{"rendered":"http:\/\/jdhitsolutions.com\/blog\/?p=1849"},"modified":"2011-11-25T09:13:49","modified_gmt":"2011-11-25T14:13:49","slug":"friday-fun-a-christmas-prompt","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell-v2-0\/1849\/friday-fun-a-christmas-prompt\/","title":{"rendered":"Friday Fun &#8211; A Christmas Prompt"},"content":{"rendered":"<p>Over the last few weeks I've read about other people's PowerShell prompts and offered a few suggestions of my own. This week's Friday Fun creates colorful holiday prompt that counts down the number of days until Christmas.<!--more--><\/p>\n<p>The function, uses a simple timespan object as part of the prompt. The fun part is that I use the foregroundcolor parameter of Write-Host to add a little whimsy. Here's what the code looks like.<\/p>\n<p>[cc lang=\"PowerShell\"]<br \/>\nFunction Prompt {<br \/>\n$time=([datetime]'12\/25\/2011'-(get-date)).ToString().Substring(0,11)<br \/>\n$text=\"[**Christmas in $($time)**]\"<br \/>\n$text.tocharArray() |foreach {<br \/>\nif ((Get-Random -min 1 -max 10) -gt 5) {<br \/>\n $color=\"RED\"<br \/>\n }<br \/>\nelse {<br \/>\n $color=\"GREEN\"<br \/>\n}<br \/>\nwrite-host $_ -nonewline -foregroundcolor $color<br \/>\n}<br \/>\nWrite (\" PS \" + (Get-Location) + \"> \")<br \/>\n} #end function<br \/>\n[\/cc]<\/p>\n<p>I cast the string '12\/25\/2011' as a datetime object and subtract the current datetime. PowerShell writes a timespan object to the pipeline which has a ToString() method. By itself I get a result like 34.05:25:44.4032824. But I don't really care for the millisecond part so I use the String object's SubString() method to parse it.  I could have used a few lines to do this but threw it all in a one line command.  The result becomes part of my text. <\/p>\n<p>The fun part is that I turn the text into an array and pipe each letter to ForEach-Object. Within the loop I get a random number between 1 and 10. If the number is greater than 5 then I write the character to the screen in Red, otherwise in Green. This is my version of a coin toss. I tried getting random numbers between 0 and 1 but I didn't seem to get enough variation. In my testing, this works fine. The last part of the prompt is the standard PS and current location. But of course, you could put in anything you want. <\/p>\n<p>Here's a sample of the finished function.<\/p>\n<p><a href=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/christmasprompt.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/christmasprompt-300x106.png\" alt=\"\" title=\"christmasprompt\" width=\"300\" height=\"106\" class=\"aligncenter size-medium wp-image-1850\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/christmasprompt-300x106.png 300w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/christmasprompt-1024x364.png 1024w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/christmasprompt.png 1172w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>I doubt this will rock your world but maybe it will make you smile.<\/p>\n<p>Download <a href='http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/ChristmasPrompt.txt' target='_blank'>ChristmasPrompt.ps1<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Over the last few weeks I&#8217;ve read about other people&#8217;s PowerShell prompts and offered a few suggestions of my own. This week&#8217;s Friday Fun creates colorful holiday prompt that counts down the number of days until Christmas.<\/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":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[271,75],"tags":[230,224,534,239],"class_list":["post-1849","post","type-post","status-publish","format-standard","hentry","category-friday-fun","category-powershell-v2-0","tag-fridayfun","tag-function","tag-powershell","tag-prompt"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Friday Fun - A Christmas Prompt &#8226; The Lonely Administrator<\/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:\/\/jdhitsolutions.com\/blog\/powershell-v2-0\/1849\/friday-fun-a-christmas-prompt\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Friday Fun - A Christmas Prompt &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"Over the last few weeks I&#039;ve read about other people&#039;s PowerShell prompts and offered a few suggestions of my own. This week&#039;s Friday Fun creates colorful holiday prompt that counts down the number of days until Christmas.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell-v2-0\/1849\/friday-fun-a-christmas-prompt\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2011-11-25T14:00:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2011-11-25T14:13:49+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/christmasprompt-300x106.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\\\/powershell-v2-0\\\/1849\\\/friday-fun-a-christmas-prompt\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell-v2-0\\\/1849\\\/friday-fun-a-christmas-prompt\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"Friday Fun &#8211; A Christmas Prompt\",\"datePublished\":\"2011-11-25T14:00:55+00:00\",\"dateModified\":\"2011-11-25T14:13:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell-v2-0\\\/1849\\\/friday-fun-a-christmas-prompt\\\/\"},\"wordCount\":326,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell-v2-0\\\/1849\\\/friday-fun-a-christmas-prompt\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2011\\\/11\\\/christmasprompt-300x106.png\",\"keywords\":[\"FridayFun\",\"Function\",\"PowerShell\",\"prompt\"],\"articleSection\":[\"Friday Fun\",\"PowerShell v2.0\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell-v2-0\\\/1849\\\/friday-fun-a-christmas-prompt\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell-v2-0\\\/1849\\\/friday-fun-a-christmas-prompt\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell-v2-0\\\/1849\\\/friday-fun-a-christmas-prompt\\\/\",\"name\":\"Friday Fun - A Christmas Prompt &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell-v2-0\\\/1849\\\/friday-fun-a-christmas-prompt\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell-v2-0\\\/1849\\\/friday-fun-a-christmas-prompt\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2011\\\/11\\\/christmasprompt-300x106.png\",\"datePublished\":\"2011-11-25T14:00:55+00:00\",\"dateModified\":\"2011-11-25T14:13:49+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell-v2-0\\\/1849\\\/friday-fun-a-christmas-prompt\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell-v2-0\\\/1849\\\/friday-fun-a-christmas-prompt\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell-v2-0\\\/1849\\\/friday-fun-a-christmas-prompt\\\/#primaryimage\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2011\\\/11\\\/christmasprompt.png\",\"contentUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2011\\\/11\\\/christmasprompt.png\",\"width\":\"1172\",\"height\":\"417\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell-v2-0\\\/1849\\\/friday-fun-a-christmas-prompt\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Friday Fun\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/friday-fun\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Friday Fun &#8211; A Christmas Prompt\"}]},{\"@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":"Friday Fun - A Christmas Prompt &#8226; The Lonely Administrator","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-v2-0\/1849\/friday-fun-a-christmas-prompt\/","og_locale":"en_US","og_type":"article","og_title":"Friday Fun - A Christmas Prompt &#8226; The Lonely Administrator","og_description":"Over the last few weeks I've read about other people's PowerShell prompts and offered a few suggestions of my own. This week's Friday Fun creates colorful holiday prompt that counts down the number of days until Christmas.","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell-v2-0\/1849\/friday-fun-a-christmas-prompt\/","og_site_name":"The Lonely Administrator","article_published_time":"2011-11-25T14:00:55+00:00","article_modified_time":"2011-11-25T14:13:49+00:00","og_image":[{"url":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/christmasprompt-300x106.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\/powershell-v2-0\/1849\/friday-fun-a-christmas-prompt\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell-v2-0\/1849\/friday-fun-a-christmas-prompt\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"Friday Fun &#8211; A Christmas Prompt","datePublished":"2011-11-25T14:00:55+00:00","dateModified":"2011-11-25T14:13:49+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell-v2-0\/1849\/friday-fun-a-christmas-prompt\/"},"wordCount":326,"commentCount":3,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell-v2-0\/1849\/friday-fun-a-christmas-prompt\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/christmasprompt-300x106.png","keywords":["FridayFun","Function","PowerShell","prompt"],"articleSection":["Friday Fun","PowerShell v2.0"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell-v2-0\/1849\/friday-fun-a-christmas-prompt\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell-v2-0\/1849\/friday-fun-a-christmas-prompt\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell-v2-0\/1849\/friday-fun-a-christmas-prompt\/","name":"Friday Fun - A Christmas Prompt &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell-v2-0\/1849\/friday-fun-a-christmas-prompt\/#primaryimage"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell-v2-0\/1849\/friday-fun-a-christmas-prompt\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/christmasprompt-300x106.png","datePublished":"2011-11-25T14:00:55+00:00","dateModified":"2011-11-25T14:13:49+00:00","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell-v2-0\/1849\/friday-fun-a-christmas-prompt\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell-v2-0\/1849\/friday-fun-a-christmas-prompt\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell-v2-0\/1849\/friday-fun-a-christmas-prompt\/#primaryimage","url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/christmasprompt.png","contentUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/christmasprompt.png","width":"1172","height":"417"},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell-v2-0\/1849\/friday-fun-a-christmas-prompt\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Friday Fun","item":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},{"@type":"ListItem","position":2,"name":"Friday Fun &#8211; A Christmas Prompt"}]},{"@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":1307,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1307\/friday-fun-powershell-pep-talk\/","url_meta":{"origin":1849,"position":0},"title":"Friday Fun PowerShell Pep Talk","author":"Jeffery Hicks","date":"April 1, 2011","format":false,"excerpt":"Today's Friday Fun is meant to help get you excited about the upcoming Scripting Games. I want to add a little pep to your PowerShell prompt. Perhaps it will even keep you motivated. What I have for you today are variety of prompt functions. Consider them variations on a theme.\u2026","rel":"","context":"In &quot;Friday Fun&quot;","block_context":{"text":"Friday Fun","link":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},"img":{"alt_text":"PowerShell Pep Talk","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/04\/color-pep-prompt-300x144.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":976,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/976\/friday-fun-more-prompts\/","url_meta":{"origin":1849,"position":1},"title":"Friday Fun &#8211; More Prompts","author":"Jeffery Hicks","date":"October 22, 2010","format":false,"excerpt":"Not too long ago I offered up a tasting of PowerShell prompts 3 ways. My first offering were variations on displaying the current date and time. But a PowerShell prompt can do much more. For today's Friday Fun I present a duo of of calculating prompts. The first item on\u2026","rel":"","context":"In &quot;Friday Fun&quot;","block_context":{"text":"Friday Fun","link":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/10\/timetogo-prompt-300x142.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":4145,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4145\/friday-fun-christmas-countdown-prompt\/","url_meta":{"origin":1849,"position":2},"title":"Friday Fun Christmas Countdown Prompt","author":"Jeffery Hicks","date":"December 5, 2014","format":false,"excerpt":"It's that time of year again where PowerShell can make all your wishes come true. Ok, maybe that's a bit much, but PowerShell is the gift that keeps giving all year long. Again, maybe too much. How about this? Here's a revised version of my Christmas countdown prompt. I've posted\u2026","rel":"","context":"In &quot;Friday Fun&quot;","block_context":{"text":"Friday Fun","link":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},"img":{"alt_text":"christmaslights","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/12\/christmaslights-150x150.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":5958,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5958\/friday-fun-perk-up-your-powershell-prompt\/","url_meta":{"origin":1849,"position":3},"title":"Friday Fun: Perk Up Your PowerShell Prompt","author":"Jeffery Hicks","date":"April 6, 2018","format":false,"excerpt":"I haven't written a Friday Fun post in quite a while. Often these posts don't have much practical value but hopefully illustrate a concept or technique. Although what I have today is something you could use immediately. I have a version of a PowerShell prompt function that will color code\u2026","rel":"","context":"In &quot;Friday Fun&quot;","block_context":{"text":"Friday Fun","link":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/04\/pslocationprompt-2_thumb.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/04\/pslocationprompt-2_thumb.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/04\/pslocationprompt-2_thumb.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":4155,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4155\/friday-fun-another-christmas-prompt\/","url_meta":{"origin":1849,"position":4},"title":"Friday Fun: Another Christmas Prompt","author":"Jeffery Hicks","date":"December 12, 2014","format":false,"excerpt":"In last week's Friday Fun post, I shared with you a PowerShell prompt that would display a festive Christmas countdown clock. This week I have another holiday related prompt function. This one is pretty straight forward and is not that much different from the default PowerShell prompt function. Function Prompt\u2026","rel":"","context":"In &quot;Friday Fun&quot;","block_context":{"text":"Friday Fun","link":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},"img":{"alt_text":"christmastree","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/12\/christmastree.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":959,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/959\/custom-prompts-3-ways\/","url_meta":{"origin":1849,"position":5},"title":"Custom Prompts 3 Ways","author":"Jeffery Hicks","date":"October 12, 2010","format":false,"excerpt":"Recently, a number of PowerShell MVPs were having a discussion about the transcript feature in Windows PowerShell. One comment that arose was a need to see how long tasks have run or otherwise provide some sort of date time information. One solution is to use a customized PowerShell prompt and\u2026","rel":"","context":"In &quot;CommandLine&quot;","block_context":{"text":"CommandLine","link":"https:\/\/jdhitsolutions.com\/blog\/category\/commandline\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/10\/colorprompt-300x127.png?resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/1849","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=1849"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/1849\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=1849"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=1849"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=1849"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}