{"id":6388,"date":"2019-01-10T11:59:27","date_gmt":"2019-01-10T16:59:27","guid":{"rendered":"https:\/\/jdhitsolutions.com\/blog\/?p=6388"},"modified":"2019-01-23T16:22:14","modified_gmt":"2019-01-23T21:22:14","slug":"maximizing-my-prompt-in-powershell-core","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6388\/maximizing-my-prompt-in-powershell-core\/","title":{"rendered":"Maximizing My Prompt in PowerShell Core"},"content":{"rendered":"<p>Yesterday I <a title=\"read the original article\" href=\"https:\/\/jdhitsolutions.com\/blog\/?p=6371\" target=\"_blank\" rel=\"blank noopener\">wrote about my intention<\/a> to make PowerShell Core, running on Windows 10, my \"daily driver\". I've also written recently about <a title=\"read about my ultimate PowerShell prompt function\" href=\"https:\/\/jdhitsolutions.com\/blog\/?p=6308\" target=\"_blank\" rel=\"blank noopener\">using the PowerShell prompt function<\/a> to provide a wide range of information. So I decided to combine the two, plus mix in some functionality from my other PowerShell tools, to create a PowerShell console with everything at my fingertips. I'm going to walk you through the process of duplicating the prompt, although you may elect to skip certain features. Along the way I'll point out what modules you'll need to install from the PowerShell Gallery. These projects are all on GitHub as well so you can check them out before installing. The code for my PowerShell prompt function is admittedly complex and if you want to customize it, you'll need some PowerShell scripting experience. Or perhaps you want to duplicate my experience . In either case, let's dig in.<\/p>\n<p><!--more--><\/p>\n<h2>My Daily PowerShell<\/h2>\n<p>Before I go through the steps I thought you might like to see the finished product.<\/p>\n<p><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/01\/image-12.png\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; background-image: none;\" title=\"My PowerShell Core daily prompt\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/01\/image_thumb-12.png\" alt=\"My PowerShell Core daily prompt\" width=\"1028\" height=\"398\" border=\"0\" \/><\/a><\/p>\n<p>The display shows the computer name with the current date and time. A list of upcoming events, a calendar with highlighted event days and some system information: uptime, percent free space on C:, percent free memory and the total number of running processes. I should point out that the finished prompt will also run on Windows PowerShell. I just happen to be using it with PowerShell Core. Still interested? You'll need to set up some additional tools.<\/p>\n<h2>MyTickle<\/h2>\n<p>I have a module that I use to keep track of upcoming events like phone calls, meetings or other items I want to make sure I don't forget. This module provides a tickler system to help me remember. You can read all about it on the <a title=\"checkout the module's repository\" href=\"https:\/\/github.com\/jdhitsolutions\/myTickle\" target=\"_blank\" rel=\"blank noopener\">GitHub repository<\/a>. This module will require some sort of SQL Server backend. I recommend you install the free <a title=\"Download the latest version\" href=\"https:\/\/www.microsoft.com\/en-us\/sql-server\/sql-server-editions-express\" target=\"_blank\" rel=\"blank noopener\">SQL Server Express<\/a> edition. Install using the default settings so that the instance name is SQLExpress. That is the path of least resistance to use this module. Otherwise, read through the help to see how to customize. Use the <strong>c:<\/strong> command to set it up.<\/p>\n<p>You can then use <a title=\"read online help\" href=\"https:\/\/github.com\/jdhitsolutions\/myTickle\/blob\/master\/Docs\/Add-TickleEvent.md\" target=\"_blank\" rel=\"blank noopener\">Add-TickleEvent<\/a> to define some reminders. My prompt function will display events due in the next 10 days. Those that are due in a day or less will be displayed in red. If it is due in 48 hours it will be displayed in yellow otherwise the reminder shows in green. Events due in the next 30 days will be used to populate the calendar.<\/p>\n<h2>PSCalendar<\/h2>\n<p>Next you'll need my <a title=\"visit the module's Github repository\" href=\"https:\/\/github.com\/jdhitsolutions\/PSCalendar\" target=\"_blank\" rel=\"blank noopener\">PSCalendar<\/a> module, at least version 1.5.0. The <a title=\"read command help online\" href=\"https:\/\/github.com\/jdhitsolutions\/PSCalendar\/blob\/master\/docs\/Show-Calendar.md\" target=\"_blank\" rel=\"blank noopener\">Show-Calendar<\/a> command will be used within the function to display a colorized month. Tickle events for the next 30 days are used as highlight dates for the calendar. Of course the module has other calendar commands you might like to use.<\/p>\n<h2>Customizing the PowerShell Core Window<\/h2>\n<p>I'm going to assume you've already downloaded and installed PowerShell Core on your Windows desktop. You can use my <a title=\"check out the module's GitHub repository\" href=\"https:\/\/github.com\/jdhitsolutions\/PSReleaseTools\" target=\"_blank\" rel=\"blank noopener\">PSReleaseTools<\/a> module to make this an easier process.<\/p>\n<pre class=\"lang:ps mark:0 decode:true\">get-psreleaseasset -Family Windows -Only64Bit | where format -eq msi | \nSave-PSReleaseAsset -Path C:\\PS6 -Passthru | foreach { invoke-item $_.fullname}\n<\/pre>\n<p>Once installed, launch PowerShell Core. I tend to always run it in an elevated session but I work at home and don't have a critical production network to worry about.\u00a0 I modified my\u00a0 Window to increase the font size (24) , font (Consolas), window\/buffer size (120x35) and set opacity (75%). I kept the default color scheme. You can set all of these things in the system settings.<\/p>\n<p><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/01\/image-13.png\"><img loading=\"lazy\" decoding=\"async\" style=\"display: inline; background-image: none;\" title=\"Setting window properties\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/01\/image_thumb-13.png\" alt=\"Setting window properties\" width=\"583\" height=\"748\" border=\"0\" \/><\/a><\/p>\n<h2>The Prompt Function<\/h2>\n<p>The last piece of the puzzle is the prompt function itself. I have put the complete <a title=\"Check out the Github gist\" href=\"https:\/\/gist.github.com\/jdhitsolutions\/b1cd5a88e804ea8b1770702f64a40b3a\" target=\"_blank\" rel=\"blank noopener\">prompt function on Github<\/a>.<\/p>\n<p><script src=\"https:\/\/gist.github.com\/jdhitsolutions\/b1cd5a88e804ea8b1770702f64a40b3a.js\"><\/script><\/p>\n<p>Download a copy and edit it as you need to. I've tried to insert comments to help you remove features you may not want to use. To automatically load the prompt edit or create the profile script for the current user current host and dot source the path the prompt function.\u00a0 To fully duplicate what I am doing you might also might want to add a few more bells and whistles.<\/p>\n<pre class=\"lang:ps mark:0 decode:true\">import-module myTickle\nimport-module PSCalendar\n\n$PSDefaultParameterValues.Add(\"Get-Calendar:Highlightdate\", (Get-TickleEvent -days 30).date.toshortdatestring())\n$PSDefaultParameterValues.Add(\"Show-Calendar:Highlightdate\", (Get-TickleEvent -days 30).date.toshortdatestring())\n. c:\\scripts\\dailyprompt.ps1\n\nfunction Test-IsAdministrator {  \n    $user = [Security.Principal.WindowsIdentity]::GetCurrent();\n    (New-Object Security.Principal.WindowsPrincipal $user).IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)  \n}\n\n\nif (Test-IsAdministrator) {\n    $n = \"Administrator\"\n}\nelse {\n    $n = \"Non-Admin\"\n}\n[console]::Title = \"$($n): PowerShell $($psversiontable.psedition) $(([regex]\"\\d+\\.\\d+.\\d+\").match($psversiontable.psversion).value)\"\n\nSet-Location C:\\\n<\/pre>\n<p>To simplify things, I'm setting some default parameter values so that the calendar will default to highlighting my tickle events. I also have some code that sets the window's title bar. If all goes well, when I start PowerShell Core, I should see my display. Although I should point out that on first load there is some background work so you won't see performance stats for a minute or so until you press Enter again. Expect that you might need to tweak a few settings.<\/p>\n<h2>PowerShell Your Life<\/h2>\n<p>I'll admit I may go a little overboard with integrating PowerShell into my life. You may not be nearly as maniacal! Still, the process in building all of this is a great learning opportunity. I hope it is for you. Take the time to go through the modules and function. See how I am integrating the different pieces. I hope it provides a better understanding of how PowerShell works and how you can build your own tools to help PowerShell manage your life.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Yesterday I wrote about my intention to make PowerShell Core, running on Windows 10, my &#8220;daily driver&#8221;. I&#8217;ve also written recently about using the PowerShell prompt function to provide a wide range of information. So I decided to combine the two, plus mix in some functionality from my other PowerShell tools, to create a PowerShell&#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: Maximizing My Prompt in #PowerShell Core (or Windows PowerShell)","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4,589],"tags":[224,534,590,239],"class_list":["post-6388","post","type-post","status-publish","format-standard","hentry","category-powershell","category-powershell-core","tag-function","tag-powershell","tag-powershell-core","tag-prompt"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Maximizing My Prompt in PowerShell Core &#8226; The Lonely Administrator<\/title>\n<meta name=\"description\" content=\"PowerShell MVP Jeff Hicks explains how he built a prompt function to use in PSCore to manage everything. It would also work in Windows PowerShell.\" \/>\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\/6388\/maximizing-my-prompt-in-powershell-core\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Maximizing My Prompt in PowerShell Core &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"PowerShell MVP Jeff Hicks explains how he built a prompt function to use in PSCore to manage everything. It would also work in Windows PowerShell.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/6388\/maximizing-my-prompt-in-powershell-core\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2019-01-10T16:59:27+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-01-23T21:22:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/01\/image_thumb-12.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=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/6388\\\/maximizing-my-prompt-in-powershell-core\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/6388\\\/maximizing-my-prompt-in-powershell-core\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"Maximizing My Prompt in PowerShell Core\",\"datePublished\":\"2019-01-10T16:59:27+00:00\",\"dateModified\":\"2019-01-23T21:22:14+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/6388\\\/maximizing-my-prompt-in-powershell-core\\\/\"},\"wordCount\":856,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/6388\\\/maximizing-my-prompt-in-powershell-core\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/01\\\/image_thumb-12.png\",\"keywords\":[\"Function\",\"PowerShell\",\"PowerShell Core\",\"prompt\"],\"articleSection\":[\"PowerShell\",\"PowerShell Core\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/6388\\\/maximizing-my-prompt-in-powershell-core\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/6388\\\/maximizing-my-prompt-in-powershell-core\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/6388\\\/maximizing-my-prompt-in-powershell-core\\\/\",\"name\":\"Maximizing My Prompt in PowerShell Core &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/6388\\\/maximizing-my-prompt-in-powershell-core\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/6388\\\/maximizing-my-prompt-in-powershell-core\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/01\\\/image_thumb-12.png\",\"datePublished\":\"2019-01-10T16:59:27+00:00\",\"dateModified\":\"2019-01-23T21:22:14+00:00\",\"description\":\"PowerShell MVP Jeff Hicks explains how he built a prompt function to use in PSCore to manage everything. It would also work in Windows PowerShell.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/6388\\\/maximizing-my-prompt-in-powershell-core\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/6388\\\/maximizing-my-prompt-in-powershell-core\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/6388\\\/maximizing-my-prompt-in-powershell-core\\\/#primaryimage\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/01\\\/image_thumb-12.png\",\"contentUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/01\\\/image_thumb-12.png\",\"width\":1028,\"height\":398},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/6388\\\/maximizing-my-prompt-in-powershell-core\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"PowerShell\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/powershell\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Maximizing My Prompt in PowerShell Core\"}]},{\"@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":"Maximizing My Prompt in PowerShell Core &#8226; The Lonely Administrator","description":"PowerShell MVP Jeff Hicks explains how he built a prompt function to use in PSCore to manage everything. It would also work in Windows PowerShell.","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\/6388\/maximizing-my-prompt-in-powershell-core\/","og_locale":"en_US","og_type":"article","og_title":"Maximizing My Prompt in PowerShell Core &#8226; The Lonely Administrator","og_description":"PowerShell MVP Jeff Hicks explains how he built a prompt function to use in PSCore to manage everything. It would also work in Windows PowerShell.","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6388\/maximizing-my-prompt-in-powershell-core\/","og_site_name":"The Lonely Administrator","article_published_time":"2019-01-10T16:59:27+00:00","article_modified_time":"2019-01-23T21:22:14+00:00","og_image":[{"url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/01\/image_thumb-12.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":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6388\/maximizing-my-prompt-in-powershell-core\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6388\/maximizing-my-prompt-in-powershell-core\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"Maximizing My Prompt in PowerShell Core","datePublished":"2019-01-10T16:59:27+00:00","dateModified":"2019-01-23T21:22:14+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6388\/maximizing-my-prompt-in-powershell-core\/"},"wordCount":856,"commentCount":2,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6388\/maximizing-my-prompt-in-powershell-core\/#primaryimage"},"thumbnailUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/01\/image_thumb-12.png","keywords":["Function","PowerShell","PowerShell Core","prompt"],"articleSection":["PowerShell","PowerShell Core"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/6388\/maximizing-my-prompt-in-powershell-core\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6388\/maximizing-my-prompt-in-powershell-core\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6388\/maximizing-my-prompt-in-powershell-core\/","name":"Maximizing My Prompt in PowerShell Core &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6388\/maximizing-my-prompt-in-powershell-core\/#primaryimage"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6388\/maximizing-my-prompt-in-powershell-core\/#primaryimage"},"thumbnailUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/01\/image_thumb-12.png","datePublished":"2019-01-10T16:59:27+00:00","dateModified":"2019-01-23T21:22:14+00:00","description":"PowerShell MVP Jeff Hicks explains how he built a prompt function to use in PSCore to manage everything. It would also work in Windows PowerShell.","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6388\/maximizing-my-prompt-in-powershell-core\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/6388\/maximizing-my-prompt-in-powershell-core\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6388\/maximizing-my-prompt-in-powershell-core\/#primaryimage","url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/01\/image_thumb-12.png","contentUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/01\/image_thumb-12.png","width":1028,"height":398},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6388\/maximizing-my-prompt-in-powershell-core\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"PowerShell","item":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},{"@type":"ListItem","position":2,"name":"Maximizing My Prompt in PowerShell Core"}]},{"@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":6439,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6439\/friday-fun-with-a-cross-platform-powershell-prompt\/","url_meta":{"origin":6388,"position":0},"title":"Friday Fun with a Cross-Platform PowerShell Prompt","author":"Jeffery Hicks","date":"January 18, 2019","format":false,"excerpt":"This year is turning out to be all things cross-platform for me. Continuing this line of discussion I have something fun and simple today. A PowerShell prompt function that will work cross-platform and provide some meaningful information in what I think is a elegant manner. You may not need the\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-20.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-20.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/01\/image_thumb-20.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/01\/image_thumb-20.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":6449,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6449\/thinking-outside-the-box-with-another-powershell-prompt\/","url_meta":{"origin":6388,"position":1},"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":[]},{"id":6275,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6275\/powershell-updown-prompt\/","url_meta":{"origin":6388,"position":2},"title":"A PowerShell Up\/Down Prompt","author":"Jeffery Hicks","date":"December 11, 2018","format":false,"excerpt":"It appears many of you are taken with the possibilities of PowerShell prompt functions. In previous posts, I alluded to the fact that you could do just about anything in a prompt function. Today I have an example of what I am talking about. The challenging part of creating a\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\/12\/image_thumb-7.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-7.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/12\/image_thumb-7.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":5958,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5958\/friday-fun-perk-up-your-powershell-prompt\/","url_meta":{"origin":6388,"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":6371,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6371\/making-the-leap-to-powershell-core\/","url_meta":{"origin":6388,"position":4},"title":"Making the Leap to PowerShell Core","author":"Jeffery Hicks","date":"January 9, 2019","format":false,"excerpt":"For years I have spent most of my time in a Windows PowerShell prompt. I have actually taken it as a badge of honor that I've been able to manage my day and all of my work from a PowerShell prompt. I also have created practically all of my content\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-11.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-11.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/01\/image_thumb-11.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/01\/image_thumb-11.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":5626,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5626\/throwing-the-kitchen-sink-at-powershell\/","url_meta":{"origin":6388,"position":5},"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":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/6388","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=6388"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/6388\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=6388"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=6388"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=6388"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}