{"id":1085,"date":"2011-01-28T09:56:11","date_gmt":"2011-01-28T14:56:11","guid":{"rendered":"http:\/\/jdhitsolutions.com\/blog\/?p=1085"},"modified":"2011-03-28T08:25:47","modified_gmt":"2011-03-28T12:25:47","slug":"friday-fun-lets-play-bingo","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1085\/friday-fun-lets-play-bingo\/","title":{"rendered":"Friday Fun: Let&#8217;s Play Bingo!"},"content":{"rendered":"<p>Today Campers we're playing Bingo. Or at least getting ready to. This week I have some PowerShell code that will create a BINGO card. For those of you outside of North America you might need to take a crash course on this <a href=\"http:\/\/en.wikipedia.org\/wiki\/Bingo_%28U.S.%29\" Target=\"_blank\">game<\/a>. But even if you don't play, this article will demonstrate some useful PowerShell concepts and cmdlets like arrays. Get-Random and New-Object.<!--more--><br \/>\nA standard BINGO card is a 5x5 matrix with BINGO spelled out across the top and a column of unique numbers for each letter. <\/p>\n<p>The first thing we need is an array of 5 numbers for each letter. Again, I'm sticking with the tradition where B is a number between 1 and 15, I is a letter between 16 and 45 and so on. Here's my first PowerShell step.<br \/>\n[cc lang=\"PowerShell\"]<br \/>\n#generate unique arrays of numbers for each letter<br \/>\n$B=1..15  | Get-Random -count 15 | select -first 5 -unique<br \/>\n$I=16..30 | Get-Random -count 15 | select -first 5 -unique<br \/>\n$N=31..45 | Get-Random -count 15 | select -first 5 -unique<br \/>\n$G=46..60 | Get-Random -count 15 | select -first 5 -unique<br \/>\n$O=61..75 | Get-Random -count 15 | select -first 5 -unique<br \/>\n[\/cc]<br \/>\nThe range operator (..) will return all numbers between 1 and 15 (and so on). I need 5 unique random numbers from this list. Piping the list to the Get-Random cmdlet would return a single value. Using the cmdlet's -Count parameter in essence takes all 15 numbers and generates a random order. Sort of like this:<br \/>\n[cc lang=\"PowerShell\"]<br \/>\nPS S:\\> 1..15 | get-random -count 5<br \/>\n15<br \/>\n9<br \/>\n5<br \/>\n13<br \/>\n10<br \/>\n[\/cc]<br \/>\nTo get 5 unique values, I pipe the collection of randomized numbers to Select-Object where I instruct the cmdlet to select the first 5 but only return unique values.<\/p>\n<p>In Bingo there is also usually at least one free space. I grew up playing in church with a free space dead center so that's where I put it on my card. There are variations with different free spaces but I'll let you work that out. For my card I'm going to modify the 3rd number t of the  $N array using the string \"FS\" to indicate free space. Remember, arrays start counting at 0.<br \/>\n[cc lang=\"PowerShell\"]<br \/>\n#replace 3 element of N with \"Free Space\"<br \/>\n$N[2]=\"FS\"<br \/>\n[\/cc]<br \/>\nNow for the fun part. Instead of trying to manipulate and parse strings, we'll use objects. You'll see the benefit in a moment. We'll use a FOR loop to count through the number of items in the letter arrays, which is 5. For each number we'll use New-Object and create a custom object. The letters in BINGO will be the property names and the corresponding array value becomes the property value.<br \/>\n[cc lang=\"PowerShell\"]<br \/>\nfor ($x=0;$x -lt 5;$x++)<br \/>\n{<br \/>\n    New-Object -TypeName PSObject -Property @{<br \/>\n        B=$b[$x]<br \/>\n        I=$i[$x]<br \/>\n        N=$n[$x]<br \/>\n        G=$g[$x]<br \/>\n        O=$o[$x]<br \/>\n     } | Select \"B\",\"I\",\"N\",\"G\",\"O\"<br \/>\n} #close FOR<br \/>\n[\/cc]<br \/>\nNew-Object doesn't write property names in the same order you define them, so I pipe the object to Select-Object and get them in the right order. When I run my final script I get output like this.<br \/>\n[cc lang=\"PowerShell\"]<br \/>\nPS S:\\> .\\New-BingoCard.ps1<\/p>\n<p>B : 5<br \/>\nI : 22<br \/>\nN : 45<br \/>\nG : 55<br \/>\nO : 72<\/p>\n<p>B : 4<br \/>\nI : 23<br \/>\nN : 44<br \/>\nG : 51<br \/>\nO : 75<\/p>\n<p>B : 6<br \/>\nI : 21<br \/>\nN : FS<br \/>\nG : 58<br \/>\nO : 68<br \/>\n...<br \/>\n[\/cc]<br \/>\nBut that's ok. I'm writing objects to the pipeline. Now I have options one what to do with them. For example, I can pipe my script to Format-Table and create a good looking grid.<br \/>\n[cc lang=\"PowerShell\"]<br \/>\nPS S:\\> .\\New-BingoCard.ps1 | format-table -AutoSize<\/p>\n<p> B  I  N  G  O<br \/>\n -  -  -  -  -<br \/>\n 7 18 39 53 68<br \/>\n 1 30 43 50 65<br \/>\n 9 23 FS 54 63<br \/>\n 6 25 38 60 74<br \/>\n11 21 41 51 66<br \/>\n[\/cc]<br \/>\nI could pipe it to a file, open in Notepad, increase the font size and print it out.<br \/>\n[cc lang=\"PowerShell\"]<br \/>\nPS S:\\> .\\New-BingoCard.ps1 | format-table -autosize | out-file c:\\work\\bingo.txt<br \/>\n[\/cc]<br \/>\nOr I can create an HTML version.<br \/>\n[cc lang=\"PowerShell\"]<br \/>\nPS S:\\> .\\New-BingoCard.ps1 |<br \/>\n>> convertto-html -title \"Bingo\" -css c:\\work\\bingo.css |<br \/>\n>> out-file c:\\work\\bingocard.htm<br \/>\n[\/cc]<br \/>\nI use a CSS link to add some nice HTML formatting. Here's my <a href='http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/01\/bingo.htm' target='_blank'>HTML bingo card.<\/a>.<\/p>\n<p>The point I'd like to drive home is to NOT include formatting in your script, otherwise you lock yourself in and miss out on all sorts of other possibilities.<\/p>\n<p>Download a zip file with my PowerShell script and CSS file <a href='http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/01\/New-BingoCard.zip'>here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today Campers we&#8217;re playing Bingo. Or at least getting ready to. This week I have some PowerShell code that will create a BINGO card. For those of you outside of North America you might need to take a crash course on this game. But even if you don&#8217;t play, this article will demonstrate some useful&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[271,4,8],"tags":[145,245,190,534,249],"class_list":["post-1085","post","type-post","status-publish","format-standard","hentry","category-friday-fun","category-powershell","category-scripting","tag-array","tag-get-random","tag-new-object","tag-powershell","tag-unique"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Friday Fun: Let&#039;s Play Bingo! &#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\/1085\/friday-fun-lets-play-bingo\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Friday Fun: Let&#039;s Play Bingo! &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"Today Campers we&#039;re playing Bingo. Or at least getting ready to. This week I have some PowerShell code that will create a BINGO card. For those of you outside of North America you might need to take a crash course on this game. But even if you don&#039;t play, this article will demonstrate some useful...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/1085\/friday-fun-lets-play-bingo\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2011-01-28T14:56:11+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2011-03-28T12:25:47+00:00\" \/>\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\\\/1085\\\/friday-fun-lets-play-bingo\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1085\\\/friday-fun-lets-play-bingo\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"Friday Fun: Let&#8217;s Play Bingo!\",\"datePublished\":\"2011-01-28T14:56:11+00:00\",\"dateModified\":\"2011-03-28T12:25:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1085\\\/friday-fun-lets-play-bingo\\\/\"},\"wordCount\":706,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"keywords\":[\"Array\",\"Get-Random\",\"new-object\",\"PowerShell\",\"Unique\"],\"articleSection\":[\"Friday Fun\",\"PowerShell\",\"Scripting\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1085\\\/friday-fun-lets-play-bingo\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1085\\\/friday-fun-lets-play-bingo\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1085\\\/friday-fun-lets-play-bingo\\\/\",\"name\":\"Friday Fun: Let's Play Bingo! &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"datePublished\":\"2011-01-28T14:56:11+00:00\",\"dateModified\":\"2011-03-28T12:25:47+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1085\\\/friday-fun-lets-play-bingo\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1085\\\/friday-fun-lets-play-bingo\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1085\\\/friday-fun-lets-play-bingo\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Friday Fun\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/friday-fun\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Friday Fun: Let&#8217;s Play Bingo!\"}]},{\"@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: Let's Play Bingo! &#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\/1085\/friday-fun-lets-play-bingo\/","og_locale":"en_US","og_type":"article","og_title":"Friday Fun: Let's Play Bingo! &#8226; The Lonely Administrator","og_description":"Today Campers we're playing Bingo. Or at least getting ready to. This week I have some PowerShell code that will create a BINGO card. For those of you outside of North America you might need to take a crash course on this game. But even if you don't play, this article will demonstrate some useful...","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1085\/friday-fun-lets-play-bingo\/","og_site_name":"The Lonely Administrator","article_published_time":"2011-01-28T14:56:11+00:00","article_modified_time":"2011-03-28T12:25:47+00:00","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\/1085\/friday-fun-lets-play-bingo\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1085\/friday-fun-lets-play-bingo\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"Friday Fun: Let&#8217;s Play Bingo!","datePublished":"2011-01-28T14:56:11+00:00","dateModified":"2011-03-28T12:25:47+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1085\/friday-fun-lets-play-bingo\/"},"wordCount":706,"commentCount":3,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"keywords":["Array","Get-Random","new-object","PowerShell","Unique"],"articleSection":["Friday Fun","PowerShell","Scripting"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/1085\/friday-fun-lets-play-bingo\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1085\/friday-fun-lets-play-bingo\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1085\/friday-fun-lets-play-bingo\/","name":"Friday Fun: Let's Play Bingo! &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"datePublished":"2011-01-28T14:56:11+00:00","dateModified":"2011-03-28T12:25:47+00:00","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1085\/friday-fun-lets-play-bingo\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/1085\/friday-fun-lets-play-bingo\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1085\/friday-fun-lets-play-bingo\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Friday Fun","item":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},{"@type":"ListItem","position":2,"name":"Friday Fun: Let&#8217;s Play Bingo!"}]},{"@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":1101,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1101\/friday-fun-more-powershell-bingo\/","url_meta":{"origin":1085,"position":0},"title":"Friday Fun &#8211; More PowerShell Bingo","author":"Jeffery Hicks","date":"February 4, 2011","format":false,"excerpt":"For last week's Friday Fun, I posted a PowerShell script to create a traditional Bingo card. I hoped you would also learn a few PowerShell concepts along the way. This week I've taken this to the next level, and have a complete module that not only creates the card but\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\/2011\/02\/powershellbingo-1024x519.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/02\/powershellbingo-1024x519.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/02\/powershellbingo-1024x519.png?resize=525%2C300 1.5x"},"classes":[]},{"id":4061,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4061\/friday-fun-lets-play-a-game\/","url_meta":{"origin":1085,"position":1},"title":"Friday Fun &#8211; Let&#8217;s Play a Game","author":"Jeffery Hicks","date":"October 3, 2014","format":false,"excerpt":"Today is going to be a lot of fun. A few years ago, back when we were still running PowerShell 2.0 everywhere, I created a module to run a Bingo game in a PowerShell session. I primarily wrote the module as a learning tool for beginners wanting to know more\u2026","rel":"","context":"In &quot;Friday Fun&quot;","block_context":{"text":"Friday Fun","link":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},"img":{"alt_text":"BingoCard-small","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/10\/BingoCard-small.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1554,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1554\/friday-fun-powershell-powerball-numbers\/","url_meta":{"origin":1085,"position":2},"title":"Friday Fun PowerShell PowerBall Numbers","author":"Jeffery Hicks","date":"July 8, 2011","format":false,"excerpt":"Like many of you, I dream about hitting the lottery and retiring to live the good life. Unfortunately I rarely play so I guess my odds are winning are pretty slim. But for the latest installment of Friday Fun, I thought I would have PowerShell help me pick some numbers\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":4220,"url":"https:\/\/jdhitsolutions.com\/blog\/scripting\/4220\/friday-the-13th-fun\/","url_meta":{"origin":1085,"position":3},"title":"Friday the 13th Fun","author":"Jeffery Hicks","date":"February 13, 2015","format":false,"excerpt":"It is that time of year again. But instead of being freaked out by Friday the 13th, let's have a little fun. Here is a collection of PowerShell one-liners, all celebrating 13. And maybe you'll even pick up something new about PowerShell. #13^13 [math]::Pow(13,13) #get the 13 letter from [CHAR]\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\/2013\/12\/friday13.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/12\/friday13.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/12\/friday13.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/12\/friday13.jpg?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":940,"url":"https:\/\/jdhitsolutions.com\/blog\/scripting\/940\/friday-fun-playing-with-strings\/","url_meta":{"origin":1085,"position":4},"title":"Friday Fun Playing with Strings","author":"Jeffery Hicks","date":"September 17, 2010","format":false,"excerpt":"While I was busy working, it turned into Friday which means time for a little PowerShell fun. I can't say you'll find any deep, meaningful, production use from today's post, but you might pick up a few techniques, which is really the point. Today we're going to have some fun\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":1849,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell-v2-0\/1849\/friday-fun-a-christmas-prompt\/","url_meta":{"origin":1085,"position":5},"title":"Friday Fun &#8211; A Christmas Prompt","author":"Jeffery Hicks","date":"November 25, 2011","format":false,"excerpt":"Over the last few weeks I've read about other people's PowerShell prompts and offered a few suggestions of my own. This week's Friday Fun creates colorful holiday prompt that counts down the number of days until Christmas. The function, uses a simple timespan object as part of the prompt. The\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\/2011\/11\/christmasprompt-300x106.png?resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/1085","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=1085"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/1085\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=1085"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=1085"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=1085"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}