{"id":6161,"date":"2018-11-16T11:22:27","date_gmt":"2018-11-16T16:22:27","guid":{"rendered":"https:\/\/jdhitsolutions.com\/blog\/?p=6161"},"modified":"2018-11-16T11:22:27","modified_gmt":"2018-11-16T16:22:27","slug":"friday-fun-powershell-thriller-revisited","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6161\/friday-fun-powershell-thriller-revisited\/","title":{"rendered":"Friday Fun: PowerShell Thriller Revisited"},"content":{"rendered":"<p><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/11\/thriller-cover.jpg\"><img loading=\"lazy\" decoding=\"async\" style=\"margin: 0px 10px 10px 0px; float: left; display: inline; background-image: none;\" title=\"thriller-cover\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/11\/thriller-cover_thumb.jpg\" alt=\"thriller-cover\" width=\"288\" height=\"432\" align=\"left\" border=\"0\" \/><\/a>A number of years ago I shared a fun PowerShell script that generated a description of a new thriller you might find in the action thriller section of your local book store. I modeled it after the works of authors like Vince Flynn, Ben Coes and James Rollins. I'm a big fan and of these types of books and certainly a guilty pleasure. Because they are genre books there is a certain formula and my script generated a description of a \"new\" book using data randomly drawn for a collection of different items such as the hero's name, his former profession (in these books the hero is almost always male), the female interest and the villainous organization.<\/p>\n<p>The first iteration was a bit simplistic. Even though I had better things to do, I spent some time updating and expanding the script. As with all my Friday Fun posts, the script is intended as a learning tool. Unless you are a budding thriller author, you really don't have any need for the script itself, other than an amusing diversion. But, if you need to see an example of how arrays are used, or here strings or even how to structure a simple script, my project will help you out.<\/p>\n<p>The current code is written as a script which means you need to specify the full path to the script and of course you need an execution policy that will run the script. Here's an example of what you can expect. The script writes a string object to the pipeline.<\/p>\n<p><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/11\/image.png\"><img loading=\"lazy\" decoding=\"async\" style=\"margin: 0px; display: inline; background-image: none;\" title=\"image\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/11\/image_thumb.png\" alt=\"image\" width=\"1028\" height=\"543\" border=\"0\" \/><\/a><\/p>\n<p>Because markdown is seemingly everywhere now, this version includes a parameter to convert some of the text into markdown.<\/p>\n<p><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/11\/image-1.png\"><img loading=\"lazy\" decoding=\"async\" style=\"margin: 0px; display: inline; background-image: none;\" title=\"image\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/11\/image_thumb-1.png\" alt=\"image\" width=\"1028\" height=\"543\" border=\"0\" \/><\/a><\/p>\n<p>One of the reasons is because PowerShell Core has a few markdown cmdlets including Show-Markdown which will render a markdown document in the console.<\/p>\n<p><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/11\/image-2.png\"><img loading=\"lazy\" decoding=\"async\" style=\"margin: 0px; display: inline; background-image: none;\" title=\"image\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/11\/image_thumb-2.png\" alt=\"image\" width=\"1028\" height=\"572\" border=\"0\" \/><\/a><\/p>\n<p>It also works in PowerShell Core on Linux.<\/p>\n<p><a href=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/11\/image-3.png\"><img loading=\"lazy\" decoding=\"async\" style=\"margin: 0px; display: inline; background-image: none;\" title=\"image\" src=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/11\/image_thumb-3.png\" alt=\"image\" width=\"1028\" height=\"572\" border=\"0\" \/><\/a><\/p>\n<p>As you can read, I'm having a bit of fun with this. The script is posted as a <a href=\"https:\/\/gist.github.com\/jdhitsolutions\/e65c82a86cbf144df49104e942e0da2a\" target=\"_blank\" rel=\"noopener\">gist<\/a> on my <a href=\"https:\/\/github.com\/jdhitsolutions\" target=\"_blank\" rel=\"noopener\">Github repo<\/a>.<\/p>\n<p><script src=\"https:\/\/gist.github.com\/jdhitsolutions\/e65c82a86cbf144df49104e942e0da2a.js\"><\/script><\/p>\n<p>In the script I define a number of arrays that contains the source items for the different elements in the book description. Originally I was piping each array to <a title=\"Read online help for this command\" href=\"http:\/\/go.microsoft.com\/fwlink\/?LinkID=113446\" target=\"_blank\" rel=\"noopener\">Get-Random<\/a> to select an element. But I wanted a bit more randomization and also some flexibility. So I wrote a private function that is embedded in the script. This function is never meant to be run directly by a user which is why it does not have a proper name.\u00a0 Each array is processed by the function to first randomize the entire collection and then select a random number of elements. In some instances I want more than one item.<\/p>\n<p>The main element of the script is a here string, defined as $blurb. A here string is a great way of creating a multi-line string. Just remember that the closing line needs to be left justified. Because this is a string, I can use variable replacement throughout. Although I am also demonstrating how to use the -f operator.\u00a0 In the here string you'll see placeholders {0} and {1}. The -f operator takes a comma separated list of values and plugs each one into the corresponding placeholder.<\/p>\n<pre class=\"lang:ps mark:0 decode:true\">$($blurb -f \"'$($title[1])'\",\"'$($title[2])'\")\r\n<\/pre>\n<p>The entire expression is defined as a sub-expression because it is being replaced in yet another here string, $out, which will be the script's output. I define a different version of $out depending on whether I need to generate markdown or not.<\/p>\n<pre class=\"lang:ps mark:0 decode:true\">if ($AsMarkdown) {\r\n    \r\n    $out = @\"\r\n\r\n# $($Title[0])\r\n\r\n## by $author\r\n\r\n$($blurb -f \"[$($title[1])]()\",\"[$($title[2])]()\")\r\n### Published $pubDate \r\n\"@\r\n}\r\nelse {\r\n    $out = @\"\r\n\r\n$($Title[0])\r\n$(\"-\" * ($title[0].length))\r\nby $author\r\n\r\n$($blurb -f \"'$($title[1])'\",\"'$($title[2])'\")\r\nPublished $pubDate\r\n\"@\r\n}\r\n<\/pre>\n<p>I've tried to annotate the code to help explain what I am doing and why. If you are learning PowerShell, I hope you'll take some time to analyze how the script works. After you've had some fun generating a few new books!<\/p>\n<p>As always, I love to hear what you think. Enjoy and check the corners.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A number of years ago I shared a fun PowerShell script that generated a description of a new thriller you might find in the action thriller section of your local book store. I modeled it after the works of authors like Vince Flynn, Ben Coes and James Rollins. I&#8217;m a big fan and of these&#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 Thriller Revisited","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,8],"tags":[568,534,540],"class_list":["post-6161","post","type-post","status-publish","format-standard","hentry","category-friday-fun","category-powershell","category-scripting","tag-friday-fun","tag-powershell","tag-scripting"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Friday Fun: PowerShell Thriller Revisited &#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\/6161\/friday-fun-powershell-thriller-revisited\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Friday Fun: PowerShell Thriller Revisited &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"A number of years ago I shared a fun PowerShell script that generated a description of a new thriller you might find in the action thriller section of your local book store. I modeled it after the works of authors like Vince Flynn, Ben Coes and James Rollins. I&#039;m a big fan and of these...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/6161\/friday-fun-powershell-thriller-revisited\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2018-11-16T16:22:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/11\/thriller-cover_thumb.jpg\" \/>\n<meta name=\"author\" content=\"Jeffery Hicks\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@JeffHicks\" \/>\n<meta name=\"twitter:site\" content=\"@JeffHicks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeffery Hicks\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/6161\\\/friday-fun-powershell-thriller-revisited\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/6161\\\/friday-fun-powershell-thriller-revisited\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"Friday Fun: PowerShell Thriller Revisited\",\"datePublished\":\"2018-11-16T16:22:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/6161\\\/friday-fun-powershell-thriller-revisited\\\/\"},\"wordCount\":638,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/6161\\\/friday-fun-powershell-thriller-revisited\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/11\\\/thriller-cover_thumb.jpg\",\"keywords\":[\"Friday Fun\",\"PowerShell\",\"Scripting\"],\"articleSection\":[\"Friday Fun\",\"PowerShell\",\"Scripting\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/6161\\\/friday-fun-powershell-thriller-revisited\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/6161\\\/friday-fun-powershell-thriller-revisited\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/6161\\\/friday-fun-powershell-thriller-revisited\\\/\",\"name\":\"Friday Fun: PowerShell Thriller Revisited &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/6161\\\/friday-fun-powershell-thriller-revisited\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/6161\\\/friday-fun-powershell-thriller-revisited\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/11\\\/thriller-cover_thumb.jpg\",\"datePublished\":\"2018-11-16T16:22:27+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/6161\\\/friday-fun-powershell-thriller-revisited\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/6161\\\/friday-fun-powershell-thriller-revisited\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/6161\\\/friday-fun-powershell-thriller-revisited\\\/#primaryimage\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/11\\\/thriller-cover_thumb.jpg\",\"contentUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/11\\\/thriller-cover_thumb.jpg\",\"width\":288,\"height\":432},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/6161\\\/friday-fun-powershell-thriller-revisited\\\/#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 Thriller Revisited\"}]},{\"@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 Thriller Revisited &#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\/6161\/friday-fun-powershell-thriller-revisited\/","og_locale":"en_US","og_type":"article","og_title":"Friday Fun: PowerShell Thriller Revisited &#8226; The Lonely Administrator","og_description":"A number of years ago I shared a fun PowerShell script that generated a description of a new thriller you might find in the action thriller section of your local book store. I modeled it after the works of authors like Vince Flynn, Ben Coes and James Rollins. I'm a big fan and of these...","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6161\/friday-fun-powershell-thriller-revisited\/","og_site_name":"The Lonely Administrator","article_published_time":"2018-11-16T16:22:27+00:00","og_image":[{"url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/11\/thriller-cover_thumb.jpg","type":"","width":"","height":""}],"author":"Jeffery Hicks","twitter_card":"summary_large_image","twitter_creator":"@JeffHicks","twitter_site":"@JeffHicks","twitter_misc":{"Written by":"Jeffery Hicks","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6161\/friday-fun-powershell-thriller-revisited\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6161\/friday-fun-powershell-thriller-revisited\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"Friday Fun: PowerShell Thriller Revisited","datePublished":"2018-11-16T16:22:27+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6161\/friday-fun-powershell-thriller-revisited\/"},"wordCount":638,"commentCount":1,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6161\/friday-fun-powershell-thriller-revisited\/#primaryimage"},"thumbnailUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/11\/thriller-cover_thumb.jpg","keywords":["Friday Fun","PowerShell","Scripting"],"articleSection":["Friday Fun","PowerShell","Scripting"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/6161\/friday-fun-powershell-thriller-revisited\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6161\/friday-fun-powershell-thriller-revisited\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6161\/friday-fun-powershell-thriller-revisited\/","name":"Friday Fun: PowerShell Thriller Revisited &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6161\/friday-fun-powershell-thriller-revisited\/#primaryimage"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6161\/friday-fun-powershell-thriller-revisited\/#primaryimage"},"thumbnailUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/11\/thriller-cover_thumb.jpg","datePublished":"2018-11-16T16:22:27+00:00","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6161\/friday-fun-powershell-thriller-revisited\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/6161\/friday-fun-powershell-thriller-revisited\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6161\/friday-fun-powershell-thriller-revisited\/#primaryimage","url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/11\/thriller-cover_thumb.jpg","contentUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/11\/thriller-cover_thumb.jpg","width":288,"height":432},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6161\/friday-fun-powershell-thriller-revisited\/#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 Thriller Revisited"}]},{"@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":6175,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6175\/more-fun-with-powershell-thrillers\/","url_meta":{"origin":6161,"position":0},"title":"More Fun with PowerShell Thrillers","author":"Jeffery Hicks","date":"November 20, 2018","format":false,"excerpt":"Last week I posted a Friday Fun article about using PowerShell to create a synopsis for a hypothetical thriller novel. Naturally I wasn't satisfied to leave it at that. Don't get me wrong, it was a good start. But I needed to take the next logical step. I had a\u2026","rel":"","context":"In &quot;Friday Fun&quot;","block_context":{"text":"Friday Fun","link":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/11\/image_thumb-6.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/11\/image_thumb-6.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/11\/image_thumb-6.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/11\/image_thumb-6.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":3455,"url":"https:\/\/jdhitsolutions.com\/blog\/scripting\/3455\/friday-fun-color-my-web\/","url_meta":{"origin":6161,"position":1},"title":"Friday Fun Color My Web","author":"Jeffery Hicks","date":"September 20, 2013","format":false,"excerpt":"Awhile ago I posted an article demonstrating using Invoke-Webrequest which is part of PowerShell 3.0. I used the page at Manning.com to display the Print and MEAP bestsellers. By the way, thanks to all of you who keep making PowerShell books popular. My original script simply wrote the results to\u2026","rel":"","context":"In &quot;Books&quot;","block_context":{"text":"Books","link":"https:\/\/jdhitsolutions.com\/blog\/category\/books\/"},"img":{"alt_text":"get-manningbestseller1","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/09\/get-manningbestseller1-1024x606.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/09\/get-manningbestseller1-1024x606.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/09\/get-manningbestseller1-1024x606.png?resize=525%2C300 1.5x"},"classes":[]},{"id":1052,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1052\/friday-fun-new-thriller\/","url_meta":{"origin":6161,"position":2},"title":"Friday Fun &#8211; New Thriller","author":"Jeffery Hicks","date":"January 14, 2011","format":false,"excerpt":"I read a lot of thrillers by authors like James Rollins, Jeff Long, Douglas Preston and Lincoln Childs. Certainly not high-brow literature, but generally well written and often a lot of fun. Of course with any fiction genre, there are certain thematic paradigms that must be followed, almost as if\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":4923,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell-ise\/4923\/friday-fun-tweaking-the-powershell-ise\/","url_meta":{"origin":6161,"position":3},"title":"Friday Fun: Tweaking the PowerShell ISE","author":"Jeffery Hicks","date":"February 19, 2016","format":false,"excerpt":"Today's fun is still PowerShell related, but instead of something in the console, we'll have some fun with the PowerShell ISE. One of the things I love about the PowerShell ISE is that you can customize it and extend it.\u00a0 My ISE Scripting Geek project is an example.\u00a0 But today\u2026","rel":"","context":"In &quot;Friday Fun&quot;","block_context":{"text":"Friday Fun","link":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},"img":{"alt_text":"image","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/02\/image_thumb-12.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":3627,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3627\/friday-fun-with-rest-regex-and-replacements\/","url_meta":{"origin":6161,"position":4},"title":"Friday Fun with REST, Regex and Replacements","author":"Jeffery Hicks","date":"January 24, 2014","format":false,"excerpt":"I just love using the web cmdlets that were introduced in PowerShell 3.0. One of the cmdlets I use the most is Invoke-RESTMethod. This isn't because I'm dealing with sites that offer REST-ful services, but rather I like that the cmdlet does all the heavy lifting for me when I\u2026","rel":"","context":"In &quot;Friday Fun&quot;","block_context":{"text":"Friday Fun","link":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},"img":{"alt_text":"computereye","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2012\/04\/computereye-150x150.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1584,"url":"https:\/\/jdhitsolutions.com\/blog\/scripting\/1584\/friday-fun-add-scripting-signing-to-the-ise\/","url_meta":{"origin":6161,"position":5},"title":"Friday Fun Add Scripting Signing to the ISE","author":"Jeffery Hicks","date":"August 5, 2011","format":false,"excerpt":"Today's fun involves adding a menu item to the PowerShell ISE to make it easy to sign your scripts. I'm not going to go into the details about getting and installing a code signing certificate. I also assume you only have one installed. You can get this certificate by seasrching\u2026","rel":"","context":"In &quot;PowerShell ISE&quot;","block_context":{"text":"PowerShell ISE","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell-ise\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/6161","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=6161"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/6161\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=6161"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=6161"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=6161"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}