{"id":4211,"date":"2015-01-30T09:15:01","date_gmt":"2015-01-30T14:15:01","guid":{"rendered":"http:\/\/jdhitsolutions.com\/blog\/?p=4211"},"modified":"2015-01-30T09:23:18","modified_gmt":"2015-01-30T14:23:18","slug":"friday-fun-arent-you-special","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4211\/friday-fun-arent-you-special\/","title":{"rendered":"Friday Fun: Aren\u2019t You Special"},"content":{"rendered":"<p><a href=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/11\/crayons.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/11\/crayons-150x150.png\" alt=\"crayons\" width=\"150\" height=\"150\" class=\"alignleft size-thumbnail wp-image-3567\" \/><\/a>If you've been following my work for any length of time you know I am constantly going on about \"objects in the pipeline\". But PowerShell is flexible enough that you should be able to use it as it meets your needs, provided you know the limitations for whatever path you take. Sometimes you really just want to read information on the screen and you want it to be as meaningful as possible. For today's fun let me show you how to add some special characters that might be just what you need to spice up an on screen display.<\/p>\n<p>First, you need to know what you can display and how. You will be using the [CHAR] class. Don't worry too much about details. You can use the [CHAR] class to display characters other than the usual alphanumeric and symbol characters on your keyboard. I also need to point out that everything I am showing you will only work in the PowerShell console, not the ISE. Here's how you can see some of these characters.<\/p>\n<pre><code>(1..6).foreach({[pscustomobject]@{char=$_;value=$_ -as [char]}}) | format-table -AutoSize<\/code><\/pre>\n<p>This snippet is the same as displaying [char]1 through [char]6.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/01\/013015_1414_FridayFunAr1.png\" alt=\"\" \/><\/p>\n<p>You'll also find these ranges of interest.<\/p>\n<pre><code>(11..31).foreach({[pscustomobject]@{char=$_;value=$_ -as [char]}}) | Format-Table \u2013AutoSize\r\n(161..190).foreach({[pscustomobject]@{char=$_;value=$_ -as [char]}}) | Format-Table -AutoSize<\/code><\/pre>\n<p><img decoding=\"async\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/01\/013015_1414_FridayFunAr2.png\" alt=\"\" \/><\/p>\n<p><img decoding=\"async\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/01\/013015_1414_FridayFunAr3.png\" alt=\"\" \/><\/p>\n<p>Or use this one-liner to display them all.<\/p>\n<pre><code>((1..6)+(11..31)+(161..190)).foreach({[pscustomobject]@{char=$_;value=$_ -as [char]}}) | Format-Table -AutoSize<\/code><\/pre>\n<p>Now that you know what is possible, let's use some of these characters. How about a visual indicator if a service is running or not?<\/p>\n<pre class=\"lang:ps decode:true \" >get-service | Sort Displayname |\r\nSelect DisplayName,\r\n@{Name=\"Indicator\";Expression={\r\nSwitch ($_.status) {\r\nRunning {[char]30}\r\nStopped {[char]31}\r\nDefault {[char]16}\r\n}\r\n}} | Format-Table -AutoSize -HideTableHeaders<\/pre>\n<p>I'm creating a custom property called Indicator which will display a special character based on the service status. To make it pretty to read I'm formatting as a table and hiding the header since I can tell from the output everything I need to know.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/01\/013015_1414_FridayFunAr4.png\" alt=\"\" \/><\/p>\n<p>Remember I mentioned limitations? The special characters cannot be sent to a file, converted to HTML or exported. All you can do is run the code and read the screen. But that may be all you require. Well, technically you can direct the output to a file with Out-File. You won't see the characters in Notepad but you should when you use Get-Content.<\/p>\n<p>Let's take the service example to another level. Using the Win32_Service class from WMI, we can tell if a service is set to Auto start but is not running. Let's use the same type of indicator for the service status and an indicator if an Auto start service isn't running.<\/p>\n<pre class=\"lang:ps decode:true \" >#filter out disabled services\r\nGet-CimInstance -ClassName Win32_Service -filter \"Startmode &lt;&gt; 'disabled'\" | \r\nSort Displayname | \r\nSelect @{Name=\"Displayname\";Expression={\r\n if ($_.DisplayName.length -ge 50) {\r\n  #truncate long displaynames\r\n  \"$($_.displayname.substring(0,50))...\"\r\n  }\r\n  else {\r\n    #use the full displayname\r\n    $_.displayname\r\n  }\r\n  }},\r\n@{Name=\"Indicator\";Expression={\r\n  Switch ($_.state) {\r\n   Running {[char]30}\r\n   Stopped {[char]31}\r\n   Default {[char]16}\r\n  }\r\n}},\r\n@{Name=\"Attention\";Expression={\r\n if ($_.startmode -eq 'Auto' -AND $_.state -ne 'Running') {\r\n   [char]15\r\n }\r\n}} | Format-Table -AutoSize -HideTableHeaders\r\n<\/pre>\n<p><img decoding=\"async\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/01\/013015_1414_FridayFunAr5.png\" alt=\"\" \/><\/p>\n<p>I used [CHAR]15 as my indicator. You know what? Since we know we can't do anything with the output other than read it on the screen (you are allowed to do this), let's go all out.<\/p>\n<pre class=\"lang:ps decode:true \" >Get-CimInstance -ClassName Win32_Service -filter \"Startmode &lt;&gt; 'disabled'\" | \r\nSort Displayname | \r\nSelect @{Name=\"Displayname\";Expression={\r\n if ($_.DisplayName.length -ge 50) {\r\n  #truncate long displaynames\r\n  \"$($_.displayname.substring(0,50))...\"\r\n  }\r\n  else {\r\n    #use the full displayname\r\n    $_.displayname\r\n  }\r\n  }},\r\n@{Name=\"Indicator\";Expression={\r\n  Switch ($_.state) {\r\n   Running {[char]30}\r\n   Stopped {[char]31}\r\n   Default {[char]16}\r\n  }\r\n}},\r\n@{Name=\"Attention\";Expression={\r\n if ($_.startmode -eq 'Auto' -AND $_.state -ne 'Running') {\r\n   [char]15\r\n }\r\n\r\n}} | foreach {\r\n\r\nwrite-Host ($_.DisplayName).padright(55,\" \")  -NoNewline\r\n\r\nswitch -Exact ($_.indicator.toInt32((Get-Culture).NumberFormat)) {\r\n 30 { $c = \"green\" }\r\n 31 { $c = \"red\" }\r\n 16 { $c = \"yellow\" }\r\n default { $c = \"white\"}\r\n}\r\n\r\nWrite-Host $($_.indicator.tostring()).Padleft(3) -ForegroundColor $c -NoNewline\r\n\r\nIf ($_.attention) {\r\n    write-host $($_.attention.tostring()).PadLeft(3) -ForegroundColor Yellow\r\n}\r\nelse {\r\n    Write-Host \" \"\r\n}\r\n}  #foreach\r\n\r\n<\/pre>\n<p>This code again uses WMI and the special characters, but then it looks at special character properties I created and determines a color to use for the output. The tricky part was converting the [CHAR] class back into an integer so that I could determine what color to use.<\/p>\n<pre><code>switch -Exact ($_.indicator.toInt32((Get-Culture).NumberFormat)) {\r\n 30 { $c = \"green\" }\r\n 31 { $c = \"red\" }\r\n 16 { $c = \"yellow\" }\r\n default { $c = \"white\"}\r\n}<\/code><\/pre>\n<p>There are probably other ways to achieve the same result, but this works for me.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/01\/013015_1414_FridayFunAr6.png\" alt=\"\" \/><\/p>\n<p>So have some fun with these special characters. Realize there are limitations to what you can do with the output, but there are probably no limitations on how you might use them. If you come up with something interesting I hope you'll share.<\/p>\n<p>Let's have fun out there.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&#8217;ve been following my work for any length of time you know I am constantly going on about &#8220;objects in the pipeline&#8221;. But PowerShell is flexible enough that you should be able to use it as it meets your needs, provided you know the limitations for whatever path you take. Sometimes you really just&#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":"Just posted! Friday Fun: Aren\u2019t You Special  #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":[271,4],"tags":[568,534],"class_list":["post-4211","post","type-post","status-publish","format-standard","hentry","category-friday-fun","category-powershell","tag-friday-fun","tag-powershell"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Friday Fun: Aren\u2019t You Special &#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\/4211\/friday-fun-arent-you-special\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Friday Fun: Aren\u2019t You Special &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"If you&#039;ve been following my work for any length of time you know I am constantly going on about &quot;objects in the pipeline&quot;. But PowerShell is flexible enough that you should be able to use it as it meets your needs, provided you know the limitations for whatever path you take. Sometimes you really just...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/4211\/friday-fun-arent-you-special\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2015-01-30T14:15:01+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2015-01-30T14:23:18+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/11\/crayons-150x150.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=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4211\\\/friday-fun-arent-you-special\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4211\\\/friday-fun-arent-you-special\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"Friday Fun: Aren\u2019t You Special\",\"datePublished\":\"2015-01-30T14:15:01+00:00\",\"dateModified\":\"2015-01-30T14:23:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4211\\\/friday-fun-arent-you-special\\\/\"},\"wordCount\":553,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4211\\\/friday-fun-arent-you-special\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2013\\\/11\\\/crayons-150x150.png\",\"keywords\":[\"Friday Fun\",\"PowerShell\"],\"articleSection\":[\"Friday Fun\",\"PowerShell\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4211\\\/friday-fun-arent-you-special\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4211\\\/friday-fun-arent-you-special\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4211\\\/friday-fun-arent-you-special\\\/\",\"name\":\"Friday Fun: Aren\u2019t You Special &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4211\\\/friday-fun-arent-you-special\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4211\\\/friday-fun-arent-you-special\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2013\\\/11\\\/crayons-150x150.png\",\"datePublished\":\"2015-01-30T14:15:01+00:00\",\"dateModified\":\"2015-01-30T14:23:18+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4211\\\/friday-fun-arent-you-special\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4211\\\/friday-fun-arent-you-special\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4211\\\/friday-fun-arent-you-special\\\/#primaryimage\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2013\\\/11\\\/crayons.png\",\"contentUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2013\\\/11\\\/crayons.png\",\"width\":603,\"height\":753},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/4211\\\/friday-fun-arent-you-special\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Friday Fun\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/friday-fun\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Friday Fun: Aren\u2019t You Special\"}]},{\"@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: Aren\u2019t You Special &#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\/4211\/friday-fun-arent-you-special\/","og_locale":"en_US","og_type":"article","og_title":"Friday Fun: Aren\u2019t You Special &#8226; The Lonely Administrator","og_description":"If you've been following my work for any length of time you know I am constantly going on about \"objects in the pipeline\". But PowerShell is flexible enough that you should be able to use it as it meets your needs, provided you know the limitations for whatever path you take. Sometimes you really just...","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4211\/friday-fun-arent-you-special\/","og_site_name":"The Lonely Administrator","article_published_time":"2015-01-30T14:15:01+00:00","article_modified_time":"2015-01-30T14:23:18+00:00","og_image":[{"url":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/11\/crayons-150x150.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":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4211\/friday-fun-arent-you-special\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4211\/friday-fun-arent-you-special\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"Friday Fun: Aren\u2019t You Special","datePublished":"2015-01-30T14:15:01+00:00","dateModified":"2015-01-30T14:23:18+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4211\/friday-fun-arent-you-special\/"},"wordCount":553,"commentCount":0,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4211\/friday-fun-arent-you-special\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/11\/crayons-150x150.png","keywords":["Friday Fun","PowerShell"],"articleSection":["Friday Fun","PowerShell"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/4211\/friday-fun-arent-you-special\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4211\/friday-fun-arent-you-special\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4211\/friday-fun-arent-you-special\/","name":"Friday Fun: Aren\u2019t You Special &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4211\/friday-fun-arent-you-special\/#primaryimage"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4211\/friday-fun-arent-you-special\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/11\/crayons-150x150.png","datePublished":"2015-01-30T14:15:01+00:00","dateModified":"2015-01-30T14:23:18+00:00","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4211\/friday-fun-arent-you-special\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/4211\/friday-fun-arent-you-special\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4211\/friday-fun-arent-you-special\/#primaryimage","url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/11\/crayons.png","contentUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/11\/crayons.png","width":603,"height":753},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4211\/friday-fun-arent-you-special\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Friday Fun","item":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},{"@type":"ListItem","position":2,"name":"Friday Fun: Aren\u2019t You Special"}]},{"@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":7956,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7956\/friday-fun-a-powershell-christmas-prompt\/","url_meta":{"origin":4211,"position":0},"title":"Friday Fun &#8211; A PowerShell Christmas Prompt","author":"Jeffery Hicks","date":"December 11, 2020","format":false,"excerpt":"Time for a new Friday Fun article. These articles use \"fun\" ways to teach you how to use PowerShell. The end goal may be silly, but hopefully the techniques and concepts are useful. Today I have an updated prompt function. You can customize your PowerShell prompt by creating a function\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\/2020\/12\/christmas-countdown.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/12\/christmas-countdown.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/12\/christmas-countdown.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/12\/christmas-countdown.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/12\/christmas-countdown.png?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/12\/christmas-countdown.png?resize=1400%2C800&ssl=1 4x"},"classes":[]},{"id":995,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/995\/friday-fun-the-kitchen-sink-prompt\/","url_meta":{"origin":4211,"position":1},"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":7489,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7489\/powershell-word-play\/","url_meta":{"origin":4211,"position":2},"title":"PowerShell Word Play","author":"Jeffery Hicks","date":"May 19, 2020","format":false,"excerpt":"A few weeks ago an Iron Scripter PowerShell challenge was issued that involved playing with words and characters. Remember, the Iron Scripter challenges aren't intended to create meaningful, production worthy code. They are designed to help you learn PowerShell fundamentals and scripting techniques. This particular challenge was aimed at beginner\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\/05\/doublechar.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/05\/doublechar.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/05\/doublechar.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/05\/doublechar.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/05\/doublechar.png?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/05\/doublechar.png?resize=1400%2C800&ssl=1 4x"},"classes":[]},{"id":4635,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4635\/prompting-for-the-holidays\/","url_meta":{"origin":4211,"position":3},"title":"Prompting for the Holidays","author":"Jeffery Hicks","date":"December 1, 2015","format":false,"excerpt":"This should wait for a Friday Fun post but since it is December 1st I decided not to wait. It is that time of year again and my PowerShell prompt is colorful and sparkly. My holiday themed PowerShell prompt (Image Credit: Jeff Hicks) In my profile I have this code\u2026","rel":"","context":"In &quot;Miscellaneous&quot;","block_context":{"text":"Miscellaneous","link":"https:\/\/jdhitsolutions.com\/blog\/category\/miscellaneous\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4145,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4145\/friday-fun-christmas-countdown-prompt\/","url_meta":{"origin":4211,"position":4},"title":"Friday Fun Christmas Countdown Prompt","author":"Jeffery Hicks","date":"December 5, 2014","format":false,"excerpt":"It's that time of year again where PowerShell can make all your wishes come true. Ok, maybe that's a bit much, but PowerShell is the gift that keeps giving all year long. Again, maybe too much. How about this? Here's a revised version of my Christmas countdown prompt. I've posted\u2026","rel":"","context":"In &quot;Friday Fun&quot;","block_context":{"text":"Friday Fun","link":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},"img":{"alt_text":"christmaslights","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/12\/christmaslights-150x150.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":3692,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3692\/another-powershell-valentine\/","url_meta":{"origin":4211,"position":5},"title":"Another PowerShell Valentine","author":"Jeffery Hicks","date":"February 14, 2014","format":false,"excerpt":"I've been sharing some Valentine's Day themed fun on Twitter today. This one is a bit too long to fit into a tweet. $text = \"Happy$([char]3)Valentine's$([char]3)Day\" $text.ToCharArray() | foreach -begin { $colors = \"Cyan\",\"Magenta\",\"Yellow\",\"White\",\"Red\",\"DarkRed\",\"Green\" } -process { write-host $_ -NoNewline -ForegroundColor ($colors| Get-Random)} -end {\"`n\"} To get the full effect\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":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/4211","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=4211"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/4211\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=4211"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=4211"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=4211"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}