{"id":976,"date":"2010-10-22T08:45:35","date_gmt":"2010-10-22T12:45:35","guid":{"rendered":"http:\/\/jdhitsolutions.com\/blog\/?p=976"},"modified":"2011-03-28T08:24:39","modified_gmt":"2011-03-28T12:24:39","slug":"friday-fun-more-prompts","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/976\/friday-fun-more-prompts\/","title":{"rendered":"Friday Fun &#8211; More Prompts"},"content":{"rendered":"<p>Not too long ago I offered up a tasting of<a href=\"http:\/\/jdhitsolutions.com\/blog\/2010\/10\/custom-prompts-3-ways\/\" target=\"_blank\"> PowerShell prompts 3 ways<\/a>. 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.<!--more--><\/p>\n<p>The first item on the menu is a countdown prompt. The original intent was to offer a constant reminder of how much time was left in the work day.<br \/>\n[cc lang=\"PowerShell\"]<br \/>\nFunction Prompt {<\/p>\n<p>    [datetime]$End=\"5:00PM\"<\/p>\n<p>     $ts=$End - (Get-Date)<br \/>\n    #increase $end by one day if more than<br \/>\n    #1 hour has elapsed past the deadline<br \/>\n    While ($ts.TotalHours -le -1)<br \/>\n    {<br \/>\n        $End=$End.AddDays(1)<br \/>\n        $ts=$End - (Get-Date)<br \/>\n    }<\/p>\n<p>    #select a color based on how many hours are left<br \/>\n    If ($ts.TotalHours -ge 5)<br \/>\n    {<br \/>\n        $fgcolor=\"Green\"<br \/>\n    }<br \/>\n    elseif ($ts.TotalHours -ge 2 -AND $ts.TotalHours -lt 5)<br \/>\n    {<br \/>\n        $fgColor=\"Yellow\"<br \/>\n    }<br \/>\n    else<br \/>\n    {<br \/>\n        $fgColor=\"Red\"<br \/>\n    }<br \/>\n    #strip off the millisecond part with Substring(). The<br \/>\n    #millisecond part will come after the last period<br \/>\n    $s=$ts.ToString()<br \/>\n    $ToGo=$s.Substring(0,$s.LastIndexOf(\".\"))<br \/>\n    $loc=\"PS {0}\" -f (get-location)<\/p>\n<p>    Write-Host \"[$ToGo]\" -NoNewline -ForegroundColor $fgcolor -BackgroundColor Black<br \/>\n    write-host $loc -NoNewline<br \/>\n    #to use Write-Host, the function has to write something to the pipeline<br \/>\n    Write \">\"<br \/>\n} #end function<br \/>\n[\/cc]<\/p>\n<p>The function has a hardcoded datetime variable which represents my countdown target.<br \/>\n[cc lang=\"PowerShell\"]<br \/>\n    [datetime]$End=\"5:00PM\"<br \/>\n[\/cc]<br \/>\nBecause I didn't specify a date component, $End will be 5:00PM for today. The prompt calculates a time span the current date and time to the ending date and time.<br \/>\n[cc lang=\"PowerShell\"]<br \/>\n     $ts=$End - (Get-Date)<br \/>\n[\/cc]<br \/>\nThe \"trick\" in the function is how I handle the situation when 5:00 has come and gone. The timespan will be negative, (which I take advantage of as you'll see in a moment.) My solution was that if an hour or more had passed since the cutoff date, to roll $End over to tomorrow.<br \/>\n[cc lang=\"PowerShell\"]<br \/>\nWhile ($ts.TotalHours -le -1)<br \/>\n    {<br \/>\n        $End=$End.AddDays(1)<br \/>\n        $ts=$End - (Get-Date)<br \/>\n    }<br \/>\n[\/cc]<br \/>\nThe assumption here is that you are using the same value on a daily basis. The function uses the timespan to help determine what color to use for display. This provides helpful visual feedback about the approaching end of the day and when it is time to go home.<br \/>\n[cc lang=\"PowerShell\"]<br \/>\nIf ($ts.TotalHours -ge 5)<br \/>\n    {<br \/>\n        $fgcolor=\"Green\"<br \/>\n    }<br \/>\n    elseif ($ts.TotalHours -ge 2 -AND $ts.TotalHours -lt 5)<br \/>\n    {<br \/>\n        $fgColor=\"Yellow\"<br \/>\n    }<br \/>\n    else<br \/>\n    {<br \/>\n        $fgColor=\"Red\"<br \/>\n    }<br \/>\n[\/cc]<br \/>\nThe rest of the function, which displays the prompt, is essentially the same. The result is something like this.<br \/>\n<a href=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/10\/timetogo-prompt.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/10\/timetogo-prompt-300x142.png\" alt=\"\" title=\"timetogo-prompt\" width=\"300\" height=\"142\" class=\"aligncenter size-medium wp-image-977\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/10\/timetogo-prompt-300x142.png 300w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/10\/timetogo-prompt.png 954w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>The other prompt on the tasting menu is one that I find most helpful personally. Instead of counting down, the prompt \"counts up\", and tells me how long the current PowerShell session has been running.<br \/>\n[cc lang=\"PowerShell\"]<br \/>\nFunction Prompt {<br \/>\n    #get start time for the current PowerShell session<br \/>\n    #$pid is a special variable for the current PowerShell process ID<br \/>\n    [datetime]$psStart=(get-Process -id $pid).StartTime<\/p>\n<p>    $ts=(Get-Date) - $psStart<br \/>\n    #strip off the millisecond part with Substring().  The<br \/>\n    #millisecond part will come after the last period<br \/>\n    $s=$ts.ToString()<br \/>\n    $elapsed=$s.Substring(0,$s.LastIndexOf(\".\"))<br \/>\n    $loc=\"PS {0}\" -f (get-location)<\/p>\n<p>    Write-Host \"[$elapsed]\" -NoNewline -ForegroundColor Cyan<br \/>\n    write-host $loc -NoNewline<br \/>\n    #to use Write-Host, the function has to write something to the pipeline<br \/>\n    Write \">\"<br \/>\n} #end function<br \/>\n[\/cc]<br \/>\nEvery PowerShell session has a system variable called $pid, which represents the process ID of the current PowerShell session. With this piece of information, I can get the PowerShell process and its StartTime property.<br \/>\n[cc lang=\"PowerShell\"]<br \/>\n[datetime]$psStart=(get-Process -id $pid).StartTime<br \/>\n[\/cc]<br \/>\nThe rest is pro-forma: calculate a time span, strip off the milliseconds and display the prompt.<br \/>\n<a href=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/10\/PowerShellTime-prompt.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/10\/PowerShellTime-prompt-300x141.png\" alt=\"\" title=\"PowerShellTime-prompt\" width=\"300\" height=\"141\" class=\"aligncenter size-medium wp-image-980\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/10\/PowerShellTime-prompt-300x141.png 300w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/10\/PowerShellTime-prompt.png 844w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>As you can tell from the screen shot, this PowerShell session has been open and running for more than 3 days. Every time I press enter, a new value is calculated and displayed.<\/p>\n<p>There's almost no limit to what you can include in your PowerShell prompt. I'd love to hear any special ways you're using it. In the meantime, you can download a text file with today's functions <a href='http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/10\/ElapsedTimePrompt.txt' target='_blank'>here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&#8217;s Friday Fun I present a duo of of calculating prompts.<\/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,4,75,8],"tags":[224,534,239,540],"class_list":["post-976","post","type-post","status-publish","format-standard","hentry","category-friday-fun","category-powershell","category-powershell-v2-0","category-scripting","tag-function","tag-powershell","tag-prompt","tag-scripting"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Friday Fun - More Prompts &#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\/976\/friday-fun-more-prompts\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Friday Fun - More Prompts &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"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&#039;s Friday Fun I present a duo of of calculating prompts.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/976\/friday-fun-more-prompts\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2010-10-22T12:45:35+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2011-03-28T12:24:39+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/10\/timetogo-prompt-300x142.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=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/976\\\/friday-fun-more-prompts\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/976\\\/friday-fun-more-prompts\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"Friday Fun &#8211; More Prompts\",\"datePublished\":\"2010-10-22T12:45:35+00:00\",\"dateModified\":\"2011-03-28T12:24:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/976\\\/friday-fun-more-prompts\\\/\"},\"wordCount\":673,\"commentCount\":4,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/976\\\/friday-fun-more-prompts\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2010\\\/10\\\/timetogo-prompt-300x142.png\",\"keywords\":[\"Function\",\"PowerShell\",\"prompt\",\"Scripting\"],\"articleSection\":[\"Friday Fun\",\"PowerShell\",\"PowerShell v2.0\",\"Scripting\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/976\\\/friday-fun-more-prompts\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/976\\\/friday-fun-more-prompts\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/976\\\/friday-fun-more-prompts\\\/\",\"name\":\"Friday Fun - More Prompts &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/976\\\/friday-fun-more-prompts\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/976\\\/friday-fun-more-prompts\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2010\\\/10\\\/timetogo-prompt-300x142.png\",\"datePublished\":\"2010-10-22T12:45:35+00:00\",\"dateModified\":\"2011-03-28T12:24:39+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/976\\\/friday-fun-more-prompts\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/976\\\/friday-fun-more-prompts\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/976\\\/friday-fun-more-prompts\\\/#primaryimage\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2010\\\/10\\\/timetogo-prompt.png\",\"contentUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2010\\\/10\\\/timetogo-prompt.png\",\"width\":\"954\",\"height\":\"452\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/976\\\/friday-fun-more-prompts\\\/#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; More Prompts\"}]},{\"@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 - More Prompts &#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\/976\/friday-fun-more-prompts\/","og_locale":"en_US","og_type":"article","og_title":"Friday Fun - More Prompts &#8226; The Lonely Administrator","og_description":"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.","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/976\/friday-fun-more-prompts\/","og_site_name":"The Lonely Administrator","article_published_time":"2010-10-22T12:45:35+00:00","article_modified_time":"2011-03-28T12:24:39+00:00","og_image":[{"url":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/10\/timetogo-prompt-300x142.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":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/976\/friday-fun-more-prompts\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/976\/friday-fun-more-prompts\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"Friday Fun &#8211; More Prompts","datePublished":"2010-10-22T12:45:35+00:00","dateModified":"2011-03-28T12:24:39+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/976\/friday-fun-more-prompts\/"},"wordCount":673,"commentCount":4,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/976\/friday-fun-more-prompts\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/10\/timetogo-prompt-300x142.png","keywords":["Function","PowerShell","prompt","Scripting"],"articleSection":["Friday Fun","PowerShell","PowerShell v2.0","Scripting"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/976\/friday-fun-more-prompts\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/976\/friday-fun-more-prompts\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/976\/friday-fun-more-prompts\/","name":"Friday Fun - More Prompts &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/976\/friday-fun-more-prompts\/#primaryimage"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/976\/friday-fun-more-prompts\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/10\/timetogo-prompt-300x142.png","datePublished":"2010-10-22T12:45:35+00:00","dateModified":"2011-03-28T12:24:39+00:00","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/976\/friday-fun-more-prompts\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/976\/friday-fun-more-prompts\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/976\/friday-fun-more-prompts\/#primaryimage","url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/10\/timetogo-prompt.png","contentUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/10\/timetogo-prompt.png","width":"954","height":"452"},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/976\/friday-fun-more-prompts\/#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; More Prompts"}]},{"@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":995,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/995\/friday-fun-the-kitchen-sink-prompt\/","url_meta":{"origin":976,"position":0},"title":"Friday Fun &#8211; The Kitchen Sink Prompt","author":"Jeffery Hicks","date":"October 29, 2010","format":false,"excerpt":"On my last Friday Fun post on PowerShell prompts, I got a terrific comment from Bart Vandyck about his prompt which has just about everything you would want. I too have a \"kitchen sink\" prompt, that is to say, one with the proverbial \"everything but the kitchen sink\". Or you\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\/everything-console-1024x798.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/10\/everything-console-1024x798.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/10\/everything-console-1024x798.png?resize=525%2C300 1.5x"},"classes":[]},{"id":6252,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6252\/your-christmas-powershell-prompt\/","url_meta":{"origin":976,"position":1},"title":"Your Christmas PowerShell Prompt","author":"Jeffery Hicks","date":"December 6, 2018","format":false,"excerpt":"Continuing my fun with PowerShell prompts and because we are in the Christmas season. I\u2019m bringing back my Christmas countdown prompt. I have updated so it should work in both the traditional console and PowerShell ISE. The prompt displays a randomly colorized countdown message with some random decorations. You can\u2026","rel":"","context":"In &quot;Miscellaneous&quot;","block_context":{"text":"Miscellaneous","link":"https:\/\/jdhitsolutions.com\/blog\/category\/miscellaneous\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/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\/2018\/12\/image_thumb-2.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/12\/image_thumb-2.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":6240,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6240\/friday-fun-with-timely-powershell-prompts\/","url_meta":{"origin":976,"position":2},"title":"Friday Fun with Timely PowerShell Prompts","author":"Jeffery Hicks","date":"November 30, 2018","format":false,"excerpt":"If PowerShell is a part of your daily routine, you most likely have a console window open all day. In addition to using PowerShell to get stuff done, you can use PowerShell to keep you on track. I've written before and talked about how I use PowerShell to manage my\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\/11\/image_thumb-13.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/11\/image_thumb-13.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/11\/image_thumb-13.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/11\/image_thumb-13.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":4155,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4155\/friday-fun-another-christmas-prompt\/","url_meta":{"origin":976,"position":3},"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":3918,"url":"https:\/\/jdhitsolutions.com\/blog\/scripting\/3918\/pimp-your-prompt\/","url_meta":{"origin":976,"position":4},"title":"Pimp your Prompt","author":"Jeffery Hicks","date":"July 16, 2014","format":false,"excerpt":"If you are like me and live in PowerShell, then you spend a great deal of your day looking at your PowerShell prompt. That little indicator in the console and ISE that usually shows where you are. That little part of your PowerShell world is defined by a built-in function\u2026","rel":"","context":"In &quot;Powershell 3.0&quot;","block_context":{"text":"Powershell 3.0","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell-3-0\/"},"img":{"alt_text":"bling2","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/07\/bling2-150x150.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":6449,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6449\/thinking-outside-the-box-with-another-powershell-prompt\/","url_meta":{"origin":976,"position":5},"title":"Thinking Outside the Box with Another PowerShell Prompt","author":"Jeffery Hicks","date":"January 21, 2019","format":false,"excerpt":"TThe other day I shared my simple PowerShell prompt function that displayed a few pieces of potentially useful information in a color coded box. Today I have a slight variation that also contains a few improvements. One of the things that I was torn with in my previous version was\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\/01\/image_thumb-23.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/01\/image_thumb-23.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/01\/image_thumb-23.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/01\/image_thumb-23.png?resize=700%2C400&ssl=1 2x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/976","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=976"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/976\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=976"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=976"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=976"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}