{"id":995,"date":"2010-10-29T10:15:34","date_gmt":"2010-10-29T14:15:34","guid":{"rendered":"http:\/\/jdhitsolutions.com\/blog\/?p=995"},"modified":"2017-08-21T18:56:37","modified_gmt":"2017-08-21T22:56:37","slug":"friday-fun-the-kitchen-sink-prompt","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/995\/friday-fun-the-kitchen-sink-prompt\/","title":{"rendered":"Friday Fun &#8211; The Kitchen Sink Prompt"},"content":{"rendered":"<p>On my last Friday Fun post on PowerShell prompts, I got a <a href=\"http:\/\/jdhitsolutions.com\/blog\/2010\/10\/friday-fun-more-prompts\/#comment-2320\" target=\"_blank\" rel=\"noopener\">terrific comment<\/a> from<a href=\"http:\/\/www.capri-technology.be\/\" target=\"_blank\" rel=\"noopener\"> Bart Vandyck<\/a> 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 might consider this an extreme prompt.<!--more--><\/p>\n<p>This prompt function displays the following information:<\/p>\n<ul>\n<li style=\"padding-left: 30px;\">Computer name<\/li>\n<li style=\"padding-left: 30px;\">PowerShell session length<\/li>\n<li style=\"padding-left: 30px;\">CPU utilization<\/li>\n<li style=\"padding-left: 30px;\">Percent free space on C:<\/li>\n<li style=\"padding-left: 30px;\">System up time<\/li>\n<li style=\"padding-left: 30px;\">Current location<\/li>\n<li style=\"padding-left: 30px;\">Amount of free memory<\/li>\n<li style=\"padding-left: 30px;\">Number of processes<\/li>\n<li style=\"padding-left: 30px;\">A history counter (I liked this idea and \"borrowed\" it from Bart)<\/li>\n<\/ul>\n<p>Like Bart, I too like a prompt that allows me to type longer commands before they start wrapping. So I create a green text box with system information. The prompt includes a history counter and a simply PS&gt; moniker. My function also takes advantage of the window title bar. There I display how long the PowerShell session has been running, the computer name and the current location.<\/p>\n<p>Here's the function.<\/p>\n<pre class=\"lang:ps decode:true\">Function prompt {\r\n\r\n#add global variable if it doesn't already exist\r\nif (-Not $global:LastCheck)\r\n{\r\n$global:LastCheck=Get-Date\r\n$global:cdrive=Get-WMIObject -query \"Select Freespace,Size from win32_logicaldisk where deviceid='c:'\"\r\n}\r\n\r\n#only refresh disk information once every 15 minutes\r\n$min=(New-TimeSpan $Global:lastCheck).TotalMinutes\r\nif ($min -ge 15)\r\n{\r\n$global:cdrive=Get-WMIObject -query \"Select Freespace,Size from win32_logicaldisk where deviceid='c:'\"\r\n$global:LastCheck=Get-Date\r\n}\r\n\r\n[int]$freeMem=(Get-Wmiobject -query \"Select FreeAndZeroPageListBytes from Win32_PerfFormattedData_PerfOS_Memory\").FreeAndZeroPageListBytes\/1mb\r\n$cpu=(get-wmiobject -class win32_processor).loadpercentage\r\n$pcount=(Get-Process).Count\r\n$diskinfo=\"{0:N2}\" -f (($global:cdrive.freespace\/1gb)\/($global:cdrive.size\/1gb)*100)\r\n#get uptime\r\n$time=Get-WmiObject -class Win32_OperatingSystem\r\n$t=$time.ConvertToDateTime($time.Lastbootuptime)\r\n[TimeSpan]$uptime=New-TimeSpan $t $(get-date)\r\n$up=\"$($uptime.days)d $($uptime.hours)h $($uptime.minutes)m $($uptime.seconds)s\"\r\n\r\n#$text=\"CPU:\"+$cpu+\"% Procs:\"+$pcount+$diskinfo+ \" \"+([char]0x25b2)+$up +\" \"+(Get-Date -format g)\r\n$text=\"CPU:{0}% FreeMem:{6}MB Procs:{1} Free C:{2}% {3}{4} {5}\" -f $cpu,$pcount,$diskinfo,([char]0x25b2),$up,(Get-Date -format g),$FreeMem\r\n\r\n$myPrompt=[char]0x250c\r\n$myPrompt+=([char]0x2500).ToString()*$text.length\r\n$myPrompt+=[char]0x2510\r\n$myPrompt+=\"`n\"\r\n$myPrompt+=([char]0x2502)+$text+([char]0x2502)\r\n$myPrompt+=\"`n\"\r\n$myPrompt+=[char]0x2514\r\n$myPrompt+=([char]0x2500).ToString()*$text.length\r\n$myPrompt+=[char]0x2518\r\nWrite-Host $myPrompt -fore Green\r\n\r\n#get history ID\r\n$hid=(Get-History -count 1).id+1\r\nWrite-Host \"$hid PS&gt;\" -nonewline\r\n\r\n#set the PowerShell session time, computername and current location in the title bar\r\n\r\n#get start time for the current PowerShell session\r\n#$pid is a special variable for the current PowerShell process ID\r\n[datetime]$psStart=(get-Process -id $pid).StartTime\r\n\r\n$ts=(Get-Date) - $psStart\r\n#strip off the millisecond part with Substring(). The\r\n#millisecond part will come after the last period\r\n$s=$ts.ToString()\r\n$elapsed=$s.Substring(0,$s.LastIndexOf(\".\"))\r\n\r\n$title=\"[{0}{1}{2}] {3}\" -f $elapsed,([char]0x25ba),$env:computername,(Get-Location)\r\n$host.ui.rawui.WindowTitle=$title\r\n#the function's actual return is nothing\r\nreturn \" \"\r\n}\r\n<\/pre>\n<p>The function works in both the regular console...<\/p>\n<p><a href=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/10\/everything-console.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-997\" title=\"everything-console\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/10\/everything-console-1024x798.png\" alt=\"\" width=\"640\" height=\"498\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/10\/everything-console-1024x798.png 1024w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/10\/everything-console-300x234.png 300w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/10\/everything-console.png 1064w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>...as well as the ISE.<\/p>\n<p><a href=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/10\/everything-ise.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-998\" title=\"everything-ise\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/10\/everything-ise.png\" alt=\"\" width=\"892\" height=\"811\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/10\/everything-ise.png 892w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/10\/everything-ise-300x272.png 300w\" sizes=\"auto, (max-width: 892px) 100vw, 892px\" \/><\/a><\/p>\n<p>I expect most of the function should be pretty straightforward. The function uses ASCII characters to draw the box and provide an uptime indicator and separator in the title. I also use the -f formatting operator a lot which is a great way to create strings without having to worry about concatenation.<\/p>\n<p>Because there is some calculating using WMI everytime you hit enter, it takes a few seconds for the prompt to appear. If you use PowerShell interactively and heavily, this may start to get annoying. One thing I've done is to keep a global timer variable. Since some items like free disk space don't change frequently, I only update that value every 15 minutes. But if you are like me with PowerShell window always open, this provides a nice system check that I can refresh simply by pressing enter. I hope you'll let me know what you think.<\/p>\n<p>Download my \"everything-but-the-kitchen-sink\" prompt <a href=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/10\/EverythingPrompt.txt\" target=\"_blank\" rel=\"noopener\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 &#8220;kitchen sink&#8221; prompt, that is to say, one with the proverbial &#8220;everything but the kitchen sink&#8221;. Or you might consider this an extreme&#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":"","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,231,75,8,19],"tags":[240,32,232,534,239,540,547],"class_list":["post-995","post","type-post","status-publish","format-standard","hentry","category-friday-fun","category-powershell","category-powershell-ise","category-powershell-v2-0","category-scripting","category-wmi","tag-formatting","tag-functions","tag-ise","tag-powershell","tag-prompt","tag-scripting","tag-wmi"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Friday Fun - The Kitchen Sink 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\/995\/friday-fun-the-kitchen-sink-prompt\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Friday Fun - The Kitchen Sink Prompt &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"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 &quot;kitchen sink&quot; prompt, that is to say, one with the proverbial &quot;everything but the kitchen sink&quot;. Or you might consider this an extreme...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/995\/friday-fun-the-kitchen-sink-prompt\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2010-10-29T14:15:34+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-08-21T22:56:37+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/10\/everything-console-1024x798.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\\\/995\\\/friday-fun-the-kitchen-sink-prompt\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/995\\\/friday-fun-the-kitchen-sink-prompt\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"Friday Fun &#8211; The Kitchen Sink Prompt\",\"datePublished\":\"2010-10-29T14:15:34+00:00\",\"dateModified\":\"2017-08-21T22:56:37+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/995\\\/friday-fun-the-kitchen-sink-prompt\\\/\"},\"wordCount\":347,\"commentCount\":4,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/995\\\/friday-fun-the-kitchen-sink-prompt\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2010\\\/10\\\/everything-console-1024x798.png\",\"keywords\":[\"formatting\",\"functions\",\"ISE\",\"PowerShell\",\"prompt\",\"Scripting\",\"WMI\"],\"articleSection\":[\"Friday Fun\",\"PowerShell\",\"PowerShell ISE\",\"PowerShell v2.0\",\"Scripting\",\"WMI\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/995\\\/friday-fun-the-kitchen-sink-prompt\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/995\\\/friday-fun-the-kitchen-sink-prompt\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/995\\\/friday-fun-the-kitchen-sink-prompt\\\/\",\"name\":\"Friday Fun - The Kitchen Sink Prompt &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/995\\\/friday-fun-the-kitchen-sink-prompt\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/995\\\/friday-fun-the-kitchen-sink-prompt\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2010\\\/10\\\/everything-console-1024x798.png\",\"datePublished\":\"2010-10-29T14:15:34+00:00\",\"dateModified\":\"2017-08-21T22:56:37+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/995\\\/friday-fun-the-kitchen-sink-prompt\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/995\\\/friday-fun-the-kitchen-sink-prompt\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/995\\\/friday-fun-the-kitchen-sink-prompt\\\/#primaryimage\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2010\\\/10\\\/everything-console.png\",\"contentUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2010\\\/10\\\/everything-console.png\",\"width\":\"1064\",\"height\":\"830\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/995\\\/friday-fun-the-kitchen-sink-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; The Kitchen Sink 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 - The Kitchen Sink 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\/995\/friday-fun-the-kitchen-sink-prompt\/","og_locale":"en_US","og_type":"article","og_title":"Friday Fun - The Kitchen Sink Prompt &#8226; The Lonely Administrator","og_description":"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 might consider this an extreme...","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/995\/friday-fun-the-kitchen-sink-prompt\/","og_site_name":"The Lonely Administrator","article_published_time":"2010-10-29T14:15:34+00:00","article_modified_time":"2017-08-21T22:56:37+00:00","og_image":[{"url":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/10\/everything-console-1024x798.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\/995\/friday-fun-the-kitchen-sink-prompt\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/995\/friday-fun-the-kitchen-sink-prompt\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"Friday Fun &#8211; The Kitchen Sink Prompt","datePublished":"2010-10-29T14:15:34+00:00","dateModified":"2017-08-21T22:56:37+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/995\/friday-fun-the-kitchen-sink-prompt\/"},"wordCount":347,"commentCount":4,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/995\/friday-fun-the-kitchen-sink-prompt\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/10\/everything-console-1024x798.png","keywords":["formatting","functions","ISE","PowerShell","prompt","Scripting","WMI"],"articleSection":["Friday Fun","PowerShell","PowerShell ISE","PowerShell v2.0","Scripting","WMI"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/995\/friday-fun-the-kitchen-sink-prompt\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/995\/friday-fun-the-kitchen-sink-prompt\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/995\/friday-fun-the-kitchen-sink-prompt\/","name":"Friday Fun - The Kitchen Sink Prompt &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/995\/friday-fun-the-kitchen-sink-prompt\/#primaryimage"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/995\/friday-fun-the-kitchen-sink-prompt\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/10\/everything-console-1024x798.png","datePublished":"2010-10-29T14:15:34+00:00","dateModified":"2017-08-21T22:56:37+00:00","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/995\/friday-fun-the-kitchen-sink-prompt\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/995\/friday-fun-the-kitchen-sink-prompt\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/995\/friday-fun-the-kitchen-sink-prompt\/#primaryimage","url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/10\/everything-console.png","contentUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2010\/10\/everything-console.png","width":"1064","height":"830"},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/995\/friday-fun-the-kitchen-sink-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; The Kitchen Sink 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":6262,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6262\/revised-everything-powershell-prompt\/","url_meta":{"origin":995,"position":0},"title":"Revised Everything PowerShell Prompt","author":"Jeffery Hicks","date":"December 7, 2018","format":false,"excerpt":"Since it is Friday and time for some more PowerShell fun, and I\u2019ve been sharing some of my prompt functions, I thought I\u2019d re-share my kitchen sink prompt. This PowerShell prompt function does *a lot* to things and gives you a snapshot view of your system everytime you press enter.\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\/12\/image_thumb-5.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-5.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/12\/image_thumb-5.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":5626,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5626\/throwing-the-kitchen-sink-at-powershell\/","url_meta":{"origin":995,"position":1},"title":"Throwing the Kitchen Sink at PowerShell","author":"Jeffery Hicks","date":"August 22, 2017","format":false,"excerpt":"The other day I was watching a good intro video from Shane Young on getting started with PowerShell profiles. I use profile scripts extensively, and they can be extremely useful in configuring your PowerShell experience. One element you could add to your profile is a customized PowerShell prompt. Microsoft provides\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"everythingprompt1","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/08\/everythingprompt1_thumb.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/08\/everythingprompt1_thumb.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/08\/everythingprompt1_thumb.png?resize=525%2C300 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2017\/08\/everythingprompt1_thumb.png?resize=700%2C400 2x"},"classes":[]},{"id":6252,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6252\/your-christmas-powershell-prompt\/","url_meta":{"origin":995,"position":2},"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":37,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/37\/get-active-directory-user-information-in-powershell\/","url_meta":{"origin":995,"position":3},"title":"Get Active Directory User Information in PowerShell","author":"Jeffery Hicks","date":"July 5, 2006","format":false,"excerpt":"One feature that PowerShell will likely be missing when it first ships is solid support for ADSI and working with Active Directory. You can use .NET DirectoryEntry objects but it feels more like programming and less like scripting. Another option for working with Active Directory in PowerShell is to use\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":7149,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7149\/friday-fun-taking-a-shortcut-path-in-your-powershell-prompt\/","url_meta":{"origin":995,"position":4},"title":"Friday Fun: Taking a Shortcut Path in Your PowerShell Prompt","author":"Jeffery Hicks","date":"January 3, 2020","format":false,"excerpt":"To kick off the new year I thought I'd take a shortcut and reclaim some wasted space in my PowerShell prompt. I know I run into this issue during classes and conferences. Perhaps you encounter it as well. You are in in the PowerShell console and have ended up in\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\/01\/image_thumb-3.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/01\/image_thumb-3.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/01\/image_thumb-3.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/01\/image_thumb-3.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":995,"position":5},"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":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/995","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=995"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/995\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=995"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=995"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=995"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}