{"id":3925,"date":"2014-07-18T08:57:13","date_gmt":"2014-07-18T12:57:13","guid":{"rendered":"http:\/\/jdhitsolutions.com\/blog\/?p=3925"},"modified":"2014-07-18T08:57:13","modified_gmt":"2014-07-18T12:57:13","slug":"friday-fun-reverse-powershell","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3925\/friday-fun-reverse-powershell\/","title":{"rendered":"Friday Fun Reverse PowerShell"},"content":{"rendered":"<p><a href=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/07\/reverse.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-3926\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/07\/reverse.png\" alt=\"reverse\" width=\"150\" height=\"150\" \/><\/a>These Friday Fun posts are not supposed to be practical, yet hopefully still entertaining and educational. Today's article is no exception but I 'll be you'll try it at least once. And you'll maybe even learn something about PowerShell that perhaps you didn't know before. It all starts with a string. We use strings all the time for things like passwords and names. Let me start by explaining some basic concepts and then we'll get to the fun stuff.<\/p>\n<pre class=\"lang:ps decode:true \" >$t = \"abcdefg\"<\/pre>\n<p>The string object has a number of methods, but I'm not going to use any of them today. Instead, I want to start by showing that the string is an array, or collection, of characters. This means you can access any element by its index number.<\/p>\n<pre class=\"lang:batch decode:true \" >\r\nPS C:\\&gt; $t[0]\r\na\r\nPS C:\\&gt; $t[3]\r\nd\r\nPS C:\\&gt; $t[-1]\r\ng\r\n<\/pre>\n<p>You can start at the end of the array with -1. You can also get several elements with the Range ( .. ) operator.<\/p>\n<pre class=\"lang:batch decode:true \" >\r\nPS C:\\&gt; $t[0..2]\r\na\r\nb\r\nc\r\n<\/pre>\n<p>So, what about counting in reverse? We know we can start at -1. -2 would give us the 2nd to last element, -3 the third to last and so on. Therefore all we need to do is count backwards to the beginning.<\/p>\n<pre class=\"lang:batch decode:true \" >PS C:\\&gt; $t[-1..-($t.length)]\r\ng\r\nf\r\ne\r\nd\r\nc\r\nb\r\na<\/pre>\n<p>I used the string length to know how far back to count. But wait, it gets better. Let's bring in the -Join operator.  This operator is designed to join elements of an array into a single string.<\/p>\n<pre class=\"lang:batch decode:true \" >PS C:\\&gt; $a=\"adam\",\"beth\",\"charlie\",\"darlene\"\r\nPS C:\\&gt; $a\r\nadam\r\nbeth\r\ncharlie\r\ndarlene\r\nPS C:\\&gt; $a -join \"||\"\r\nadam||beth||charlie||darlene<\/pre>\n<p>If you don't want to specify a delimiter, you can use -Join like this:<\/p>\n<pre class=\"lang:batch decode:true \" >PS C:\\&gt; -join $a\r\nadambethcharliedarlene<\/pre>\n<p>See where I'm going with this? Let's join the reversed array of string characters.<\/p>\n<pre class=\"lang:batch decode:true \" >PS C:\\&gt; -join $t[-1..-($t.length)]\r\ngfedcba<\/pre>\n<p>So if I can take any string and reverse it, why not reverse PowerShell? I created a function called Out-Reverse.<\/p>\n<pre class=\"lang:ps decode:true \" >#requires -version 3.0\r\n\r\nFunction Out-Reverse {\r\n\r\n&lt;#\r\n.Synopsis\r\nReverse command output to text.\r\n.Description\r\nThis command will take any input and write it to the console as reverse text.\r\n.Example\r\nPS C:\\&gt; get-service m* | Out-Reverse\r\n\r\n                           emaNyalpsiD               emaN   sutatS\r\n                           -----------               ----   ------\r\n                         rvSpotkseDTCM      rvSpotkseDTCM  gninnuR\r\n            reludehcS ssalC aidemitluM              SSCMM  deppotS\r\n           ecivreS ecnanetniaM allizoM ecnanetniaMallizoM  deppotS\r\n                      llaweriF swodniW             cvSspM  gninnuR\r\n   rotanidrooC noitcasnarT detubirtsiD              CTDSM  deppotS\r\n     ecivreS rotaitinI ISCSi tfosorciM            ISCSiSM  deppotS\r\n                     rellatsnI swodniW          revresism  deppotS\r\n             retliF draobyeK tfosorciM   retliFdraobyeKsM  deppotS\r\n              )REVRESLQSSM( revreS LQS        REVRESLQSSM  gninnuR\r\n              revreS PCHD NAP sseleriW      SNDPCHDiFiWyM  deppotS\r\n.Example\r\nPS C:\\&gt; \"PowerShell\" | Out-Reverse\r\nllehSrewoP\r\n\r\n.Example\r\nPS C:\\&gt; get-eventlog -list | format-list | out-reverse\r\n\r\nnoitacilppA :                  goL\r\neslaF :  stnevEgnisiaRelbanE\r\n08402 :     setyboliKmumixaM\r\n0 : syaDnoitneteRmuminiM\r\ndedeeNsAetirwrevO :       noitcAwolfrevO\r\n\r\nstnevEerawdraH :                  goL\r\neslaF :  stnevEgnisiaRelbanE\r\n08402 :     setyboliKmumixaM\r\n0 : syaDnoitneteRmuminiM\r\ndedeeNsAetirwrevO :       noitcAwolfrevO\r\n\r\nrerolpxE tenretnI :                  goL\r\neslaF :  stnevEgnisiaRelbanE\r\n215 :     setyboliKmumixaM\r\n7 : syaDnoitneteRmuminiM\r\nredlOetirwrevO :       noitcAwolfrevO\r\n...\r\n\r\n.Notes\r\nLast Updated: July 16, 2014\r\nVersion     : 0.9\r\n\r\n.Inputs\r\nObject\r\n\r\n.Outputs\r\nString\r\n\r\n#&gt;\r\n\r\n[cmdletbinding()]\r\nParam(\r\n[Parameter(Position=0,ValueFromPipeline)]\r\n[Object]$InputObject)\r\n\r\nBegin {\r\n    Write-Verbose -Message \"Starting $($MyInvocation.Mycommand)\"  \r\n    $data = @()\r\n} #begin\r\n\r\nProcess {\r\n $data += $InputObject\r\n}\r\nEnd {\r\n    $Text = ($Data | Out-String).Split(\"`n\")\r\n    foreach ($line in $text) {\r\n     -join $line[-1..-$($line.length)]\r\n    }\r\n    Write-Verbose -Message \"Ending $($MyInvocation.Mycommand)\"\r\n} #end\r\n}\r\n\r\n#define an alias\r\nSet-Alias -Name orv -Value Out-Reverse\r\n<\/pre>\n<p>The idea is that you can run any PowerShell expression, pipe it to Out-Reverse, and you'll get just that: reverse output.<br \/>\n<a href=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/07\/out-reverse.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/07\/out-reverse-300x165.png\" alt=\"out-reverse\" width=\"300\" height=\"165\" class=\"aligncenter size-medium wp-image-3928\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/07\/out-reverse-300x165.png 300w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/07\/out-reverse-672x372.png 672w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/07\/out-reverse.png 974w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>The function takes any pipeline input and stores it in a temporary array. Once everything has been processed, the data is converted to a string with Out-String. Because I need to process each line separately, I split what would otherwise be a very long single string, into multiple strings on the end of line marker (`n).<\/p>\n<pre class=\"lang:ps decode:true \" >$Text = ($Data | Out-String).Split(\"`n\")<\/pre>\n<p>$Text is now an array of strings and I can reverse each one.<\/p>\n<pre class=\"lang:ps decode:true \" >foreach ($line in $text) {\r\n     -join $line[-1..-$($line.length)]\r\n    }<\/pre>\n<p>It is kind of fun looking at reversed output. For you language geeks, this also makes a great palindrome tester.<\/p>\n<pre class=\"lang:batch decode:true \" >PS C:\\&gt;  \"able was I saw elba\" | orv\r\nable was I saw elba\r\nPS C:\\&gt;  \"madam i'm adam\" | orv\r\nmada m'i madam<\/pre>\n<p>Or maybe you need some simple obfuscation.<\/p>\n<pre class=\"lang:batch decode:true \" >\r\nPS C:\\&gt; get-content C:\\work\\ComputerData.xml | orv\r\n&gt;sretupmoc&lt;\r\n&gt;'tne-18niw-hj'=eman retupmoc&lt;    \r\n&gt;\/ lairessoib&lt;        \r\n&gt;\/ noisrevso&lt;        \r\n&gt;retupmoc\/&lt;    \r\n&gt;'10cd-ihc'=eman retupmoc&lt;    \r\n&gt;\/ lairessoib&lt;        \r\n&gt;\/ noisrevso&lt;        \r\n&gt;retupmoc\/&lt;    \r\n&gt;sretupmoc\/&lt;<\/pre>\n<p>Actually, if you find a production-worthy use of this function I hope you'll share it with me and the community. But as always I hope you picked up a PowerShell tidbit along the way that you can use in your \"real\" PowerShell work.<\/p>\n<p>Enjoy your weekend. I'm sure you earned it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>These Friday Fun posts are not supposed to be practical, yet hopefully still entertaining and educational. Today&#8217;s article is no exception but I &#8216;ll be you&#8217;ll try it at least once. And you&#8217;ll maybe even learn something about PowerShell that perhaps you didn&#8217;t know before. It all starts with a string. We use strings all&#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":"Friday Fun Reverse #PowerShell http:\/\/wp.me\/p1nF6U-11j","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":[],"class_list":["post-3925","post","type-post","status-publish","format-standard","hentry","category-friday-fun","category-powershell","category-scripting"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Friday Fun Reverse PowerShell &#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\/3925\/friday-fun-reverse-powershell\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Friday Fun Reverse PowerShell &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"These Friday Fun posts are not supposed to be practical, yet hopefully still entertaining and educational. Today&#039;s article is no exception but I &#039;ll be you&#039;ll try it at least once. And you&#039;ll maybe even learn something about PowerShell that perhaps you didn&#039;t know before. It all starts with a string. We use strings all...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/3925\/friday-fun-reverse-powershell\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2014-07-18T12:57:13+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/07\/reverse.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\\\/3925\\\/friday-fun-reverse-powershell\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3925\\\/friday-fun-reverse-powershell\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"Friday Fun Reverse PowerShell\",\"datePublished\":\"2014-07-18T12:57:13+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3925\\\/friday-fun-reverse-powershell\\\/\"},\"wordCount\":458,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3925\\\/friday-fun-reverse-powershell\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/07\\\/reverse.png\",\"articleSection\":[\"Friday Fun\",\"PowerShell\",\"Scripting\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3925\\\/friday-fun-reverse-powershell\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3925\\\/friday-fun-reverse-powershell\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3925\\\/friday-fun-reverse-powershell\\\/\",\"name\":\"Friday Fun Reverse PowerShell &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3925\\\/friday-fun-reverse-powershell\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3925\\\/friday-fun-reverse-powershell\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/07\\\/reverse.png\",\"datePublished\":\"2014-07-18T12:57:13+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3925\\\/friday-fun-reverse-powershell\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3925\\\/friday-fun-reverse-powershell\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3925\\\/friday-fun-reverse-powershell\\\/#primaryimage\",\"url\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/07\\\/reverse.png\",\"contentUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/07\\\/reverse.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3925\\\/friday-fun-reverse-powershell\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Friday Fun\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/friday-fun\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Friday Fun Reverse PowerShell\"}]},{\"@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 Reverse PowerShell &#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\/3925\/friday-fun-reverse-powershell\/","og_locale":"en_US","og_type":"article","og_title":"Friday Fun Reverse PowerShell &#8226; The Lonely Administrator","og_description":"These Friday Fun posts are not supposed to be practical, yet hopefully still entertaining and educational. Today's article is no exception but I 'll be you'll try it at least once. And you'll maybe even learn something about PowerShell that perhaps you didn't know before. It all starts with a string. We use strings all...","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3925\/friday-fun-reverse-powershell\/","og_site_name":"The Lonely Administrator","article_published_time":"2014-07-18T12:57:13+00:00","og_image":[{"url":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/07\/reverse.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\/3925\/friday-fun-reverse-powershell\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3925\/friday-fun-reverse-powershell\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"Friday Fun Reverse PowerShell","datePublished":"2014-07-18T12:57:13+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3925\/friday-fun-reverse-powershell\/"},"wordCount":458,"commentCount":2,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3925\/friday-fun-reverse-powershell\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/07\/reverse.png","articleSection":["Friday Fun","PowerShell","Scripting"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/3925\/friday-fun-reverse-powershell\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3925\/friday-fun-reverse-powershell\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3925\/friday-fun-reverse-powershell\/","name":"Friday Fun Reverse PowerShell &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3925\/friday-fun-reverse-powershell\/#primaryimage"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3925\/friday-fun-reverse-powershell\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/07\/reverse.png","datePublished":"2014-07-18T12:57:13+00:00","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3925\/friday-fun-reverse-powershell\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/3925\/friday-fun-reverse-powershell\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3925\/friday-fun-reverse-powershell\/#primaryimage","url":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/07\/reverse.png","contentUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/07\/reverse.png"},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3925\/friday-fun-reverse-powershell\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Friday Fun","item":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},{"@type":"ListItem","position":2,"name":"Friday Fun Reverse PowerShell"}]},{"@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":940,"url":"https:\/\/jdhitsolutions.com\/blog\/scripting\/940\/friday-fun-playing-with-strings\/","url_meta":{"origin":3925,"position":0},"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":1389,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1389\/friday-fun-randomness-abounds\/","url_meta":{"origin":3925,"position":1},"title":"Friday Fun Randomness Abounds","author":"Jeffery Hicks","date":"April 29, 2011","format":false,"excerpt":"I find it a little ironic that although I like efficiency, structure and order I'm fascinated with randomness. In today's Friday Fun I want to explore a few ways you might incorporate randomness into your PowerShell scripting. Perhaps you need a random number between 100 and 500. Or a string\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":2720,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2720\/silly-saturday-powershell-palindromes\/","url_meta":{"origin":3925,"position":2},"title":"Silly Saturday PowerShell Palindromes","author":"Jeffery Hicks","date":"January 19, 2013","format":false,"excerpt":"Normally I post amusing PowerShell-related content on Fridays as part of my Friday Fun series. These are light-hearted articles about using PowerShell. Almost always they are not practical but they serve as a learning vehicle. My topic this week seems extra silly so I'm moving it to Saturday. I'm a\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"242px-Sator_Square_at_Opp\u00e8de","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/01\/242px-Sator_Square_at_Opp%C3%A8de-150x150.jpg?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":3925,"position":3},"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":1660,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1660\/friday-fun-what-a-char\/","url_meta":{"origin":3925,"position":4},"title":"Friday Fun What a CHAR!","author":"Jeffery Hicks","date":"September 23, 2011","format":false,"excerpt":"Last week I posted a PowerShell snippet on Twitter. My original post piped an array of integers as [CHAR] type using an OFS. Don't worry about that. As many people reminded me, it is much easier to use the -Join operator. -join [char[]](116,103,105,102) I'll let you try that on your\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":6240,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6240\/friday-fun-with-timely-powershell-prompts\/","url_meta":{"origin":3925,"position":5},"title":"Friday Fun with Timely PowerShell Prompts","author":"Jeffery Hicks","date":"November 30, 2018","format":false,"excerpt":"If PowerShell is a part of your daily routine, you most likely have a console window open all day. In addition to using PowerShell to get stuff done, you can use PowerShell to keep you on track. I've written before and talked about how I use PowerShell to manage my\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-13.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-13.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/11\/image_thumb-13.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/11\/image_thumb-13.png?resize=700%2C400&ssl=1 2x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/3925","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=3925"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/3925\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=3925"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=3925"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=3925"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}