{"id":7278,"date":"2020-02-14T12:53:06","date_gmt":"2020-02-14T17:53:06","guid":{"rendered":"https:\/\/jdhitsolutions.com\/blog\/?p=7278"},"modified":"2020-02-14T12:53:12","modified_gmt":"2020-02-14T17:53:12","slug":"friday-fun-powershell-ascii-art","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7278\/friday-fun-powershell-ascii-art\/","title":{"rendered":"Friday Fun PowerShell ASCII Art"},"content":{"rendered":"<p>Today's post is definitely on the fun side. In fact, I apologize in advance for the afternoon you are about to blow playing with this code. Those of you of a certain age will recall dial up modems and bulletin boards. Part of the experience was visual. Board operators often displayed the name of their site in some form of ASCII Art.<\/p>\n<p><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/02\/image-11.png\"><img loading=\"lazy\" decoding=\"async\" style=\"margin: 0px; display: inline; background-image: none;\" title=\"image\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/02\/image_thumb-11.png\" alt=\"image\" width=\"1028\" height=\"596\" border=\"0\" \/><\/a><\/p>\n<p>Maybe you'd like to display a fancy banner as part of a module or your profile.<\/p>\n<p><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/02\/image-12.png\"><img loading=\"lazy\" decoding=\"async\" style=\"margin: 0px; display: inline; background-image: none;\" title=\"image\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/02\/image_thumb-12.png\" alt=\"image\" width=\"1028\" height=\"120\" border=\"0\" \/><\/a><\/p>\n<p>Here's an easy way to turn a piece of text into ASCII art using the API offered at <a title=\"http:\/\/artii.herokuapp.com\/\" href=\"http:\/\/artii.herokuapp.com\/\">http:\/\/artii.herokuapp.com\/<\/a>.<\/p>\n<p>You can use <a title=\"Read online help for this command\" href=\"http:\/\/go.microsoft.com\/fwlink\/?LinkID=217034\" target=\"_blank\" rel=\"noopener noreferrer\">Invoke-RestMethod<\/a> to\u00a0 invoke the API. You need to specify a string of text and a font.\u00a0 You can get a list of fonts by running this command:<\/p>\n<pre class=\"lang:ps mark:0 decode:true\">invoke-restmethod https:\/\/artii.herokuapp.com\/fonts_list\n<\/pre>\n<p>The font names are case-sensitive. As to what the fonts look like, well, that's where your afternoon is about to go. Not every font will produce useable results for every text sample. Things can get a little weird with numbers and symbols with some of the fonts. Again, you can use Invoke-RestMethod to run the <u><em>make<\/em><\/u> API, specifying the text and font.<\/p>\n<p><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/02\/image-13.png\"><img loading=\"lazy\" decoding=\"async\" style=\"margin: 0px; display: inline; background-image: none;\" title=\"image\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/02\/image_thumb-13.png\" alt=\"image\" width=\"1028\" height=\"175\" border=\"0\" \/><\/a><\/p>\n<p>Where this can get tricky is with phrases. You need to escape things like spaces.<\/p>\n<p><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/02\/image-14.png\"><img loading=\"lazy\" decoding=\"async\" style=\"margin: 0px; display: inline; background-image: none;\" title=\"image\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/02\/image_thumb-14.png\" alt=\"image\" width=\"750\" height=\"181\" border=\"0\" \/><\/a><\/p>\n<p>You would use the escaped text in the Invoke-RestMethod call. But relax, I've made this easier with a function.<\/p>\n<pre class=\"lang:ps mark:0 decode:true\">#requires -version 5.1\n#ConvertTo-ASCIIArt.ps1\n\n&lt;#\nfont list at https:\/\/artii.herokuapp.com\/fonts_list\nfont names are case-sensitive\n\ninvoke-restmethod https:\/\/artii.herokuapp.com\/fonts_list\n\n#&gt;\n\nFunction ConvertTo-ASCIIArt {\n    [cmdletbinding()]\n    [alias(\"cart\")]\n    [outputtype([System.String])]\n    Param(\n        [Parameter(Position = 0, Mandatory, HelpMessage = \"Enter a short string of text to convert\", ValueFromPipeline)]\n        [ValidateNotNullOrEmpty()]\n        [string]$Text,\n        [Parameter(Position = 1,HelpMessage = \"Specify a font from https:\/\/artii.herokuapp.com\/fonts_list. Font names are case-sensitive\")]\n        [ValidateNotNullOrEmpty()]\n        [string]$Font = \"big\"\n    )\n\n    Begin {\n        Write-Verbose \"[$((Get-Date).TimeofDay) BEGIN] Starting $($myinvocation.mycommand)\"\n    } #begin\n\n    Process {\n        Write-Verbose \"[$((Get-Date).TimeofDay) PROCESS] Processing $text with font $Font\"\n        $testEncode = [uri]::EscapeDataString($Text)\n        $url = \"http:\/\/artii.herokuapp.com\/make?text=$testEncode&amp;font=$Font\"\n        Try {\n            Invoke-Restmethod -Uri $url -DisableKeepAlive -ErrorAction Stop\n        }\n        Catch {\n            Throw $_\n        }\n    } #process\n    End {\n        Write-Verbose \"[$((Get-Date).TimeofDay) END    ] Ending $($myinvocation.mycommand)\"\n    } #end\n}\n<\/pre>\n<p>l even defined an alias to make is super easy.<\/p>\n<p><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/02\/image-15.png\"><img loading=\"lazy\" decoding=\"async\" style=\"margin: 0px; display: inline; background-image: none;\" title=\"image\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/02\/image_thumb-15.png\" alt=\"image\" width=\"796\" height=\"664\" border=\"0\" \/><\/a><\/p>\n<p>Once you have this, you can make it interesting with <a title=\"Read online help for this command\" href=\"http:\/\/go.microsoft.com\/fwlink\/?LinkID=113426\" target=\"_blank\" rel=\"noopener noreferrer\">Write-Host<\/a>.<\/p>\n<p><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/02\/image-16.png\"><img loading=\"lazy\" decoding=\"async\" style=\"margin: 0px; display: inline; background-image: none;\" title=\"image\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/02\/image_thumb-16.png\" alt=\"image\" width=\"1028\" height=\"370\" border=\"0\" \/><\/a><\/p>\n<p>Or take a look at this code:<\/p>\n<pre class=\"lang:ps mark:0 decode:true\">$t = @\"\n  _____                       _____ _          _ _ \n |  __ \\                     \/ ____| |        | | |\n | |__) |____      _____ _ __ (___ | |__   ___| | |\n |  ___\/ _ \\ \\ \/\\ \/ \/ _ \\ '__\\___ \\| '_ \\ \/ _ \\ | |\n | |  | (_) \\ V  V \/  __\/ |  ____) | | | |  __\/ | |\n |_|   \\___\/ \\_\/\\_\/ \\___|_| |_____\/|_| |_|\\___|_|_|\n                                                   \n\"@\n\nfor ($i=0;$i -lt $t.length;$i++) {\nif ($i%2) {\n $c = \"red\"\n}\nelseif ($i%5) {\n $c = \"yellow\"\n}\nelseif ($i%7) {\n $c = \"green\"\n}\nelse {\n   $c = \"white\"\n}\nwrite-host $t[$i] -NoNewline -ForegroundColor $c\n}<\/pre>\n<p>I created the art text at the console and copied it to the clipboard where I could paste it as a here string.<\/p>\n<p><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/02\/image-17.png\"><img loading=\"lazy\" decoding=\"async\" style=\"margin: 0px; display: inline; background-image: none;\" title=\"image\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/02\/image_thumb-17.png\" alt=\"image\" width=\"873\" height=\"250\" border=\"0\" \/><\/a><\/p>\n<p>There's no end to what you can do.<\/p>\n<p><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/02\/image-18.png\"><img loading=\"lazy\" decoding=\"async\" style=\"margin: 0px; display: inline; background-image: none;\" title=\"image\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/02\/image_thumb-18.png\" alt=\"image\" width=\"1028\" height=\"184\" border=\"0\" \/><\/a><\/p>\n<p>So have fun. Sorry about your afternoon. And if you come up with a use case for this, I'd love to hear about it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today&#8217;s post is definitely on the fun side. In fact, I apologize in advance for the afternoon you are about to blow playing with this code. Those of you of a certain age will recall dial up modems and bulletin boards. Part of the experience was visual. Board operators often displayed the name of their&#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: Friday Fun - #PowerShell ASCII Art","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,429,534],"class_list":["post-7278","post","type-post","status-publish","format-standard","hentry","category-friday-fun","category-powershell","tag-friday-fun","tag-invoke-restmethod","tag-powershell"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Friday Fun PowerShell ASCII Art &#8226; The Lonely Administrator<\/title>\n<meta name=\"description\" content=\"Some fun PowerShell code to turn plain text into ASCII art using a free API and Invoke-RestMethod.\" \/>\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\/7278\/friday-fun-powershell-ascii-art\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Friday Fun PowerShell ASCII Art &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"Some fun PowerShell code to turn plain text into ASCII art using a free API and Invoke-RestMethod.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/7278\/friday-fun-powershell-ascii-art\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2020-02-14T17:53:06+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-02-14T17:53:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/02\/image_thumb-11.png\" \/>\n<meta name=\"author\" content=\"Jeffery Hicks\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@JeffHicks\" \/>\n<meta name=\"twitter:site\" content=\"@JeffHicks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeffery Hicks\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7278\\\/friday-fun-powershell-ascii-art\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7278\\\/friday-fun-powershell-ascii-art\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"Friday Fun PowerShell ASCII Art\",\"datePublished\":\"2020-02-14T17:53:06+00:00\",\"dateModified\":\"2020-02-14T17:53:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7278\\\/friday-fun-powershell-ascii-art\\\/\"},\"wordCount\":321,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7278\\\/friday-fun-powershell-ascii-art\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/02\\\/image_thumb-11.png\",\"keywords\":[\"Friday Fun\",\"Invoke-RestMethod\",\"PowerShell\"],\"articleSection\":[\"Friday Fun\",\"PowerShell\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7278\\\/friday-fun-powershell-ascii-art\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7278\\\/friday-fun-powershell-ascii-art\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7278\\\/friday-fun-powershell-ascii-art\\\/\",\"name\":\"Friday Fun PowerShell ASCII Art &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7278\\\/friday-fun-powershell-ascii-art\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7278\\\/friday-fun-powershell-ascii-art\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/02\\\/image_thumb-11.png\",\"datePublished\":\"2020-02-14T17:53:06+00:00\",\"dateModified\":\"2020-02-14T17:53:12+00:00\",\"description\":\"Some fun PowerShell code to turn plain text into ASCII art using a free API and Invoke-RestMethod.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7278\\\/friday-fun-powershell-ascii-art\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7278\\\/friday-fun-powershell-ascii-art\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7278\\\/friday-fun-powershell-ascii-art\\\/#primaryimage\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/02\\\/image_thumb-11.png\",\"contentUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/02\\\/image_thumb-11.png\",\"width\":1028,\"height\":596},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/7278\\\/friday-fun-powershell-ascii-art\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Friday Fun\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/friday-fun\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Friday Fun PowerShell ASCII Art\"}]},{\"@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 PowerShell ASCII Art &#8226; The Lonely Administrator","description":"Some fun PowerShell code to turn plain text into ASCII art using a free API and Invoke-RestMethod.","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\/7278\/friday-fun-powershell-ascii-art\/","og_locale":"en_US","og_type":"article","og_title":"Friday Fun PowerShell ASCII Art &#8226; The Lonely Administrator","og_description":"Some fun PowerShell code to turn plain text into ASCII art using a free API and Invoke-RestMethod.","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7278\/friday-fun-powershell-ascii-art\/","og_site_name":"The Lonely Administrator","article_published_time":"2020-02-14T17:53:06+00:00","article_modified_time":"2020-02-14T17:53:12+00:00","og_image":[{"url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/02\/image_thumb-11.png","type":"","width":"","height":""}],"author":"Jeffery Hicks","twitter_card":"summary_large_image","twitter_creator":"@JeffHicks","twitter_site":"@JeffHicks","twitter_misc":{"Written by":"Jeffery Hicks","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7278\/friday-fun-powershell-ascii-art\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7278\/friday-fun-powershell-ascii-art\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"Friday Fun PowerShell ASCII Art","datePublished":"2020-02-14T17:53:06+00:00","dateModified":"2020-02-14T17:53:12+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7278\/friday-fun-powershell-ascii-art\/"},"wordCount":321,"commentCount":3,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7278\/friday-fun-powershell-ascii-art\/#primaryimage"},"thumbnailUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/02\/image_thumb-11.png","keywords":["Friday Fun","Invoke-RestMethod","PowerShell"],"articleSection":["Friday Fun","PowerShell"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/7278\/friday-fun-powershell-ascii-art\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7278\/friday-fun-powershell-ascii-art\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7278\/friday-fun-powershell-ascii-art\/","name":"Friday Fun PowerShell ASCII Art &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7278\/friday-fun-powershell-ascii-art\/#primaryimage"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7278\/friday-fun-powershell-ascii-art\/#primaryimage"},"thumbnailUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/02\/image_thumb-11.png","datePublished":"2020-02-14T17:53:06+00:00","dateModified":"2020-02-14T17:53:12+00:00","description":"Some fun PowerShell code to turn plain text into ASCII art using a free API and Invoke-RestMethod.","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7278\/friday-fun-powershell-ascii-art\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/7278\/friday-fun-powershell-ascii-art\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7278\/friday-fun-powershell-ascii-art\/#primaryimage","url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/02\/image_thumb-11.png","contentUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/02\/image_thumb-11.png","width":1028,"height":596},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7278\/friday-fun-powershell-ascii-art\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Friday Fun","item":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},{"@type":"ListItem","position":2,"name":"Friday Fun PowerShell ASCII Art"}]},{"@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":4011,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4011\/friday-fun-a-popup-alternative\/","url_meta":{"origin":7278,"position":0},"title":"Friday Fun &#8211; A Popup Alternative","author":"Jeffery Hicks","date":"September 12, 2014","format":false,"excerpt":"In the past I've written and presented about different ways to add graphical elements to your PowerShell scripts that don't rely on Windows Forms or WPF. There's nothing wrong with those techniques, but they certainly require some expertise and depending on your situation may be overkill. So let's have some\u2026","rel":"","context":"In &quot;Friday Fun&quot;","block_context":{"text":"Friday Fun","link":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},"img":{"alt_text":"windowpane-thumbnail","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/09\/windowpane-thumbnail.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":4407,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4407\/friday-fun-a-powershell-macro\/","url_meta":{"origin":7278,"position":1},"title":"Friday Fun: A PowerShell Macro","author":"Jeffery Hicks","date":"May 15, 2015","format":false,"excerpt":"Today's Friday Fun is a little different in that it showcases two things I use almost every day: Microsoft Word and PowerShell. I am writing new articles and material almost daily and of course very often the content is PowerShell related. Usually I use the blog post template in Word\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":"","width":0,"height":0},"classes":[]},{"id":995,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/995\/friday-fun-the-kitchen-sink-prompt\/","url_meta":{"origin":7278,"position":2},"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":1143,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1143\/set-file-encoding\/","url_meta":{"origin":7278,"position":3},"title":"Set File Encoding","author":"Jeffery Hicks","date":"February 15, 2011","format":false,"excerpt":"For most people, when you create a script in PowerShell you generally don't worry too much about how it is encoded. Most everything you encounter in PowerShell uses Unicode files. But when sharing files sometimes this causes problems. For example, when I post a script for download here, I need\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":3042,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3042\/friday-fun-a-powershell-tickler\/","url_meta":{"origin":7278,"position":4},"title":"Friday Fun: A PowerShell Tickler","author":"Jeffery Hicks","date":"May 17, 2013","format":false,"excerpt":"I spend a lot of my day in the PowerShell console. As you might imagine, I often have a lot going on and sometimes it is a challenge to keep on top of everything. So I thought I could use PowerShell to help out. I created a PowerShell tickler system.\u2026","rel":"","context":"In &quot;Friday Fun&quot;","block_context":{"text":"Friday Fun","link":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},"img":{"alt_text":"elmo","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/05\/elmo-221x300.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1156,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1156\/powershell-ise-most-recent-files\/","url_meta":{"origin":7278,"position":5},"title":"PowerShell ISE Most Recent Files","author":"Jeffery Hicks","date":"February 21, 2011","format":false,"excerpt":"The PowerShell ISE is a handy tool for editing and testing your scripts, functions and modules. If you can't afford a good commercial editor then you should at least be using the ISE. One benefit of the ISE is that it has its own object model which means it is\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\/2011\/02\/isemenu-300x198.png?resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/7278","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=7278"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/7278\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=7278"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=7278"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=7278"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}