{"id":5310,"date":"2016-12-19T10:44:39","date_gmt":"2016-12-19T15:44:39","guid":{"rendered":"http:\/\/jdhitsolutions.com\/blog\/?p=5310"},"modified":"2016-12-19T11:47:42","modified_gmt":"2016-12-19T16:47:42","slug":"a-classy-powershell-christmas","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5310\/a-classy-powershell-christmas\/","title":{"rendered":"A Classy PowerShell Christmas"},"content":{"rendered":"<p>Well it's that time of year again to have some holiday fun with PowerShell. This year I thought I'd give you a classy present. Or more accurately, a class-based PowerShell toy. Classes were introduced in PowerShell 5.0, primarily with DSC resources in mind, but you can use classes for all sorts of things.<!--more--><\/p>\n<p>In simple terms, a class is a definition of some type of object. In PowerShell you can now define a class in a simple PowerShell script file. The basic outline looks like this:<\/p>\n<pre class=\"lang:ps mark:0 decode:true \">Class theClassName {\r\n\r\n#define properties\r\n\r\n#define methods (optional)\r\n\r\n#define constructors (optional\r\n\r\n}\r\n<\/pre>\n<p>The constructor is a block of code that can create an instance of your class or object. It is completely optional as you can create an instance of your class using either of these statements:<\/p>\n<pre class=\"lang:ps mark:0 decode:true \">[theClassname]::New()\r\nNew-Object theClassname\r\n<\/pre>\n<p>But perhaps I\u00a0 should just let you unwrap my class present.<\/p>\n<pre class=\"lang:ps mark:0 decode:true \">#requires -version 5.0\r\n\r\n&lt;#\r\nChristmasClass.ps1\r\nA demo PowerShell class\r\n#&gt;\r\n\r\nEnum ListStatus {\r\n    Naughty\r\n    Nice\r\n}\r\n\r\nEnum Present {\r\n    Socks\r\n    Barbie\r\n    Elmo\r\n    XBox\r\n    GIJoe\r\n    Underwear\r\n    HotWheels\r\n    EZBakeOven\r\n    Walkman\r\n    PS4\r\n    Pajamas\r\n    Stratego\r\n    GinzuKnives\r\n    ChiaPet\r\n    Tie\r\n    Mittens\r\n    Bicycle\r\n    Pony\r\n    Battleship\r\n    CabbagePatchDoll\r\n}\r\n\r\nClass myChristmas {\r\n\r\n#class properties\r\n[string]$Greeting\r\n[string]$ElfName\r\n[ListStatus]$List\r\n[int]$DaysRemaining\r\n[string]$CountDown\r\n\r\n#class methods\r\n[string]GetGreeting() {\r\n  $texts = @(\"Merry Christmas\",\"Happy Holidays\",\"HO-HO-HO\",\"Vrolijk Kerstfeest\",\r\n  \"Joyeux No\u00ebl\",\"Frohe Weihnachten\",\"Hyv\u00e4\u00e4 Joulua\",\"Gl\u00e6delig Jul\",\"Kala Christouyenna\",\r\n  \"Mele Kalikimaka\",\"Buon Natale\",\"Merry Xmas\",\"Merry Christmas &amp; A Happy New Year\",\r\n  \"Meri Kuri\",\"God Jul\",\"Nollaig Chridheil\",\"Feliz Navidad\",\r\n  \"Sch\u00f6ni Wiehnachte\",\"Mutlu Noeller\",\"Nadolig Llawen\",\"toDwI'ma' qoS yItIvqu'\"\r\n   )\r\n  $text = $texts | Get-Random\r\n  return $text\r\n}\r\n\r\n[string]GetElfName() {\r\n\r\n    $first = \"Toby\",\"Bernard\",\"Princess\",\"Harvey\",\"Chuck\",\"Doris\",\"Elsa\",\r\n    \"Snookums\",\"Honey\",\"Norm\",\"Coco\",\"Sven\",\"Inga\",\"Boris\",\r\n    \"Benedict\",\"Sunshine\",\"Kiki\",\"Nutmeg\",\"Humperdink\",\"Jack\",\r\n    \"Bertha\",\"Matilda\",\"Clarice\",\"Dwight\",\"Hermey\",\"Rupert\",\"Lady\",\r\n    \"Izzy\"\r\n\r\n    $mod = \"Ginger\",\"Glitter\",\"Frosty\",\"Sugar\",\"Sour\",\"Pepper\",\r\n    \"Minty\",\"Crazy\",\"Spicy\",\"Pickle\",\"Twinkle\",\"Sparkle\",\"Disco\",\"Red\",\r\n    \"Green\",\"Little\",\"Big\",\"Tiny\",\"Glow\",\"Shimmer\",\"Dazzle\",\"Winter\",\"Jingle\",\r\n    \"Puffy\",\"Fluffy\",\"Saucy\",\"Crinkle\"\r\n    \r\n    $last = \"pants\",\"toes\",\"bottom\",\"beard\",\"nose\",\"puss\",\"lips\",\r\n    \"ears\",\"socks\",\"stockings\",\"belly\",\"cheeks\",\"bells\",\"chin\",\r\n    \"mctush\",\"sticks\",\"fish\",\"whisker\",\"boots\",\"slippers\",\"knicker\",\r\n    \"knocker\"\r\n\r\n    $name = \"{0} {1}{2}\" -f (Get-Random $first),(Get-Random $mod),(Get-Random $last)\r\n    return $name\r\n}\r\n\r\n[void]Refresh() {\r\n #calculate christmas for the current year that should be culture aware\r\n $Christmas = [datetime]::new( (Get-Date).Year,12,25)\r\n $span = $Christmas - (Get-Date)\r\n $this.DaysRemaining = $span.totalDays\r\n #strip off milliseconds\r\n $timestring = $span.ToString()\r\n $this.CountDown = $timestring.Substring(0,$timestring.LastIndexOf(\".\"))\r\n \r\n $this.Greeting = $this.GetGreeting()\r\n}\r\n\r\n#overloaded method\r\n[Present]GetPresent() {\r\n  $presents = [enum]::GetNames([present]) | Get-Random\r\n  return $presents\r\n}\r\n\r\n[Present[]]GetPresent([int]$Count) {\r\n  $presents = [enum]::GetNames([present]) | Get-Random -count $Count\r\n  return $presents\r\n}\r\n\r\n[void]Play() {\r\n  #The first number is the reciprocal of the duration and the rest is the \r\n#note and octave (which we use for getting the frequency).  \r\n#For example, 4A4 is a quarter A note\r\n\r\n#first verse only\r\n$notes =  write 4A4 4A4 2A4        4A4 4A4 2A4        4A4 4C4 4F3 8G3             1A4 `\r\n  4Bb4 4Bb4 4Bb4 8Bb4     4Bb4 4A4 4A4 8A4 8A4    4A4 4G3 4G3 4A4    2G3 2C4 `\r\n  4A4 4A4 2A4       4A4 4A4 2A4    4A4 4C4 4F3 4G3     1A4        4Bb4 4Bb4 4Bb4 4Bb4 `\r\n  4Bb4 4A4 4A4 8A4 8A4    4C4 4C4 4Bb4 4G3     1F3  \r\n\r\nfunction Play([int] $freq, [int] $duration)\r\n{\r\n  [console]::Beep($freq, $duration);\r\n}\r\n\r\n \r\n#\r\n# Note is given by fn=f0 * (a)^n\r\n# a is the twelth root of 2\r\n# n is the number of half steps from f0, positive or negative.\r\n# f0 used here is A4 at 440 Hz\r\n#\r\n$f0 = 440;\r\n$a = [math]::pow(2,(1\/12)); # Twelth root of 2\r\nfunction GetNoteFreq([string]$note)\r\n{\r\n  # n is the number of half steps from the fixed note.\r\n  $note -match '([A-G#]{1,2})(\\d+)' | out-null\r\n  $octave = ([int] $matches[2]) - 4;\r\n  $n = $octave * 12 + ( GetHalfStepsFromA $matches[1] );\r\n  $freq = $f0 * [math]::Pow($a, $n);\r\n\r\n  return $freq;\r\n}\r\n\r\n \r\nfunction GetHalfStepsFromA([string] $note)\r\n{\r\n  switch($note)\r\n  {\r\n    'A'  { 0 }\r\n    'A#' { 1 }\r\n    'Bb' { 1 }\r\n    'B'  { 2 }\r\n    'C'  { 3 }\r\n    'C#' { 4 }\r\n    'Db' { 4 }\r\n    'D'  { 5 }\r\n    'D#' { 6 }\r\n    'Eb' { 6 }\r\n    'E'  { 7 }\r\n    'F'  { 8 }\r\n    'F#' { 9 }\r\n    'Gb' { 9 }\r\n    'G'  { 10 }\r\n    'G#' { 11 }\r\n    'Ab' { 11 }\r\n  }\r\n}\r\n\r\n\r\n$StandardDuration = 1000;\r\nforeach($note in $notes)\r\n{\r\n\r\n  $note -match '(\\d)(.+)' | out-null\r\n  $duration = $StandardDuration \/ ([int] $matches[1]);\r\n  $playNote = $matches[2];\r\n  $freq = GetNoteFreq $playNote;\r\n\r\n  #write-host $playNote $freq $duration;\r\n Play $freq $duration\r\n  start-sleep -milli 50\r\n}\r\n\r\n}\r\n\r\n[void]Show() {\r\n  cls\r\n\r\n$Msg1 =\r\n@\"\r\n.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:.\r\n.     *                                       .\r\n.    \/.\\        Merry Christmas               .\r\n.   \/..'\\            from all of us           .\r\n.   \/'.'\\                in PowerShell        .\r\n.  \/.''.'\\                                    .\r\n.  \/.'.'.\\                                    .\r\n. \/'.''.'.\\                                   .\r\n. ^^^[_]^^^                                   .\r\n.                                             .\r\n.                                             .\r\n.                                          .\r\n.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:.\r\n\"@\r\n\r\n\r\n$Msg2 =\r\n@\"\r\n                    _...\r\n              o_.-\"`    `\\\r\n       .--.  _ `'-._.-'\"\"-;     _\r\n     .'    \\`_\\_  {_.-a\"a-}  _ \/ \\\r\n   _\/     .-'  '. {c-._o_.){\\|`  |\r\n  (@`-._ \/       \\{    ^  } \\\\ _\/\r\n   `~\\  '-._      \/'.     }  \\}  .-.\r\n     |&gt;:&lt;   '-.__\/   '._,} \\_\/  \/ ())  \r\n     |     &gt;:&lt;   `'---. ____'-.|(`\"`\r\n     \\            &gt;:&lt;  \\\\_\\\\_\\ | ;\r\n      \\                 \\\\-{}-\\\/  \\\r\n       \\                 '._\\\\'   \/)\r\n        '.                       \/(\r\n          `-._ _____ _ _____ __.'\\ \\\r\n            \/ \\     \/ \\     \/ \\   \\ \\ \r\n         _.'\/^\\'._.'\/^\\'._.'\/^\\'.__) \\\r\n     ,=='  `---`   '---'   '---'      )\r\n     `\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"`\r\n\"@\r\n\r\n$msg3 = \r\n@\"\r\n               ___\r\n             \/`   `'.\r\n            \/   _..---;\r\n            |  \/__..._\/  .--.-.\r\n            |.'  e e | ___\\_|\/____\r\n           (_)'--.o.--|    | |    |\r\n          .-( `-' = `-|____| |____|\r\n         \/  (         |____   ____|\r\n         |   (        |_   | |  __|\r\n         |    '-.--';\/'\/__ | | (  `|\r\n         |      '.   \\    )\"\";--`\\ \/\r\n         \\        ;   |--'    `;.-'\r\n         |`-.__ ..-'--'`;..--'`\r\n\"@\r\n\r\n$msg4 = \r\n@\"\r\n           *             ,\r\n                       _\/^\\_\r\n                      &lt;     &gt;\r\n     *                 \/.-.\\         *\r\n              *        `\/&amp;\\`                   *\r\n                      ,@.*;@,\r\n                     \/_o.I %_\\    *\r\n        *           (`'--:o(_@;\r\n                   \/`;--.,__ `')             *\r\n                  ;@`o % O,*`'`&amp;\\ \r\n            *    (`'--)_@ ;o %'()\\      *\r\n                 \/`;--._`''--._O'@;\r\n                \/&amp;*,()~o`;-.,_ `\"\"`)\r\n     *          \/`,@ ;+&amp; () o*`;-';\\\r\n               (`\"\"--.,_0 +% @' &amp;()\\\r\n               \/-.,_    ``''--....-'`)  *\r\n          *    \/@%;o`:;'--,.__   __.'\\\r\n              ;*,&amp;(); @ % &amp;^;~`\"`o;@();         *\r\n              \/(); o^~; &amp; ().o@*&amp;`;&amp;%O\\\r\n              `\"=\"==\"\"==,,,.,=\"==\"===\"`\r\n           __.----.(\\-''#####---...___...-----._\r\n         '`         \\)_`\"\"\"\"\"`\r\n                 .--' ')\r\n               o(  )_-\\\r\n                 `\"\"\"` `\r\n \r\n\"@\r\n\r\n$msg5 =\r\n@\"\r\n                        .--------.\r\n   *               .    |________|        .          *\r\n                        |      __|\/\\\r\n             *        .-'======\\_\\o\/.\r\n                     \/___________&lt;&gt;__\\\r\n               ||||||  \/  (o) (o)  \\\r\n               |||||| |   _  O  _   |          .\r\n     .         |||||| |  (_)   (_)  |\r\n               ||||||  \\   '---'   \/    *\r\n               \\====\/   [~~~~~~~~~]\r\n                \\\\\/\/  _\/~||~`|~~~~~\\_\r\n                _||-'`\/  ||  |      \\`'-._       *\r\n        *    .-` )|  ;   ||  |)      ;    '. \r\n            \/    `--.|   ||  |       |      `\\\r\n           |         \\   |||||)      |-,      \\         .\r\n            \\       .;       _       ; |_,    |\r\n             `'''||` ,\\     (_)     \/,    `.__\/\r\n                 ||.`  '.         .'  `.             *\r\n      *          ||       ` ' ' `       \\\r\n                 ||                      ;\r\n   .          *  ||                      |    .\r\n                 ||                      |              *\r\n                 ||                      |\r\n .__.-\"\"-.__.-\"\"\"||                      ;.-\"\"\"-.__.-\"\"-.__.\r\n                 ||                     \/\r\n                 ||'.                 .'\r\n                 ||  '-._  _ _  _ _.-'\r\n                `\"\"`       \r\n\"@\r\n$msg6 =\r\n@\"\r\n                                  _\r\n                               .-(_)\r\n                              \/ _\/\r\n                           .-'   \\\r\n                          \/       '.\r\n                        ,-~--~-~-~-~-,\r\n                       {__.._...__..._}             ,888,\r\n       ,888,          \/\\##\"  6  6  \"##\/\\          ,88' `88,\r\n     ,88' '88,__     |(\\`    (__)    `\/)|     __,88'     `88\r\n    ,88'   .8(_ \\_____\\_    '----'    _\/_____\/ _)8.       8'\r\n    88    (___)\\ \\      '-.__    __.-'      \/ \/(___)\r\n    88    (___)88 |          '--'          | 88(___)\r\n    8'      (__)88,___\/                \\___,88(__)\r\n              __`88,_\/__________________\\_,88`__\r\n             \/    `88,       |88|       ,88'    \\\r\n            \/        `88,    |88|    ,88'        \\\r\n           \/____________`88,_\\88\/_,88`____________\\\r\n          \/88888888888888888;8888;88888888888888888\\\r\n         \/^^^^^^^^^^^^^^^^^^`\/88\\\\^^^^^^^^^^^^^^^^^^\\\r\n        \/                    |88| \\============,     \\\r\n       \/_  __  __  __   _ __ |88|_|^  MERRY    | _ ___\\\r\n       |;:.                  |88| | CHRISTMAS! |      |\r\n       |;;:.                 |88| '============'      |\r\n       |;;:.                 |88|                     |\r\n       |::.                  |88|                     |\r\n       |;;:'                 |88|                     |\r\n       |:;,                  |88|                     |\r\n       '---------------------\"\"\"\"---------------------'\r\n\"@\r\n\r\n$i = Get-Random -Minimum 1 -Maximum 6\r\n\r\n$selected = ($msg1,$msg2,$msg3,$msg4,$msg5,$msg6 | Get-Random)\r\nIf([bool]!($i%2)) {\r\n\tWrite-Host -ForegroundColor Green -Object $selected\r\n        \r\n\t} else {\r\n\tWrite-Host -ForegroundColor Red -Object $selected\r\n\t}\r\n\r\n\r\n}\r\n\r\n#class constructor\r\nmyChristmas() {\r\n $this.ElfName = $this.GetElfName()\r\n\r\n if ( (Get-Date).Second%2) {\r\n    $this.List = [ListStatus]::Naughty\r\n }\r\n else {\r\n    $this.List = [ListStatus]::Nice\r\n }\r\n \r\n #set the rest of the properties by invoking the defined\r\n #Refresh() method\r\n\r\n $this.Refresh()\r\n}\r\n\r\n}\r\n\r\n[myChristmas]::new()\r\n<\/pre>\n<p>You will need PowerShell 5.0 or later to run this file.\u00a0 The script defines the class and then creates an instance of it so I'll run the script and save the results to a variable.<\/p>\n<p><a href=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/12\/image.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border: 0px;\" title=\"image\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/12\/image_thumb.png\" alt=\"image\" width=\"544\" height=\"294\" border=\"0\" \/><\/a><\/p>\n<p>The properties are defined in the class. When I invoke the New() method to create an instance of the object, the code in the constructor session is executed. The $this object will refer to the new instance. In my case I am invoking an internal method called GetElfName() to set the ElfName property.\u00a0 If you look at that method you'll see that it is prefaced with an object time (string). When using a method in a PowerShell class you must specify what type of object it will return, or use [void] to return nothing. Also note that if your method writes an object to the pipeline you must use the return keyword.<\/p>\n<p>The List property is set from an <em>enumeration<\/em>. This is a way of creating a pre-determined array of possible values. In my case, Naughty or Nice, which is more or less randomly assigned.<\/p>\n<p>The remaining properties are set by invoking the internal Refresh() method which calculates how many days are left until Christmas.\u00a0 If you pipe the object to <a title=\"Read online help for this command\" href=\"http:\/\/go.microsoft.com\/fwlink\/?LinkID=113322\" target=\"_blank\">Get-Member<\/a> you will see how the object matches up to the class definition.<\/p>\n<p><a href=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/12\/image-1.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border: 0px;\" title=\"image\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/12\/image_thumb-1.png\" alt=\"image\" width=\"644\" height=\"331\" border=\"0\" \/><\/a><\/p>\n<p>I don't want to spoil all the surprises so I'll let you play with some of the methods. But let me at least point out the GetPresent() method. If you look at the screen shot you'll see that there are two ways to run it. This is referred to as an <em>overload<\/em>. If you look at the code in the class definition, you'll see multiple entries for the method, with different parameter options.<\/p>\n<p><a href=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/12\/image-2.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border: 0px;\" title=\"image\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/12\/image_thumb-2.png\" alt=\"image\" width=\"388\" height=\"200\" border=\"0\" \/><\/a><\/p>\n<p>By the way, the method is merely returning one or several randomly selected items from another enumeration for presents. Hopefully you will get something you like.<\/p>\n<p>Enjoy my gift and I wish you all the best for the holiday season and a terrific 2017.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Well it&#8217;s that time of year again to have some holiday fun with PowerShell. This year I thought I&#8217;d give you a classy present. Or more accurately, a class-based PowerShell toy. Classes were introduced in PowerShell 5.0, primarily with DSC resources in mind, but you can use classes for all sorts of things.<\/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 from the blog: A Classy #PowerShell Christmas","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":[4],"tags":[516,534],"class_list":["post-5310","post","type-post","status-publish","format-standard","hentry","category-powershell","tag-classes","tag-powershell"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>A Classy PowerShell Christmas &#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\/5310\/a-classy-powershell-christmas\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"A Classy PowerShell Christmas &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"Well it&#039;s that time of year again to have some holiday fun with PowerShell. This year I thought I&#039;d give you a classy present. Or more accurately, a class-based PowerShell toy. Classes were introduced in PowerShell 5.0, primarily with DSC resources in mind, but you can use classes for all sorts of things.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/5310\/a-classy-powershell-christmas\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2016-12-19T15:44:39+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2016-12-19T16:47:42+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/12\/image_thumb.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=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5310\\\/a-classy-powershell-christmas\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5310\\\/a-classy-powershell-christmas\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"A Classy PowerShell Christmas\",\"datePublished\":\"2016-12-19T15:44:39+00:00\",\"dateModified\":\"2016-12-19T16:47:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5310\\\/a-classy-powershell-christmas\\\/\"},\"wordCount\":477,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5310\\\/a-classy-powershell-christmas\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/12\\\/image_thumb.png\",\"keywords\":[\"Classes\",\"PowerShell\"],\"articleSection\":[\"PowerShell\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5310\\\/a-classy-powershell-christmas\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5310\\\/a-classy-powershell-christmas\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5310\\\/a-classy-powershell-christmas\\\/\",\"name\":\"A Classy PowerShell Christmas &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5310\\\/a-classy-powershell-christmas\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5310\\\/a-classy-powershell-christmas\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/12\\\/image_thumb.png\",\"datePublished\":\"2016-12-19T15:44:39+00:00\",\"dateModified\":\"2016-12-19T16:47:42+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5310\\\/a-classy-powershell-christmas\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5310\\\/a-classy-powershell-christmas\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5310\\\/a-classy-powershell-christmas\\\/#primaryimage\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/12\\\/image_thumb.png\",\"contentUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/12\\\/image_thumb.png\",\"width\":544,\"height\":294},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/5310\\\/a-classy-powershell-christmas\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"PowerShell\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/powershell\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"A Classy PowerShell Christmas\"}]},{\"@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":"A Classy PowerShell Christmas &#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\/5310\/a-classy-powershell-christmas\/","og_locale":"en_US","og_type":"article","og_title":"A Classy PowerShell Christmas &#8226; The Lonely Administrator","og_description":"Well it's that time of year again to have some holiday fun with PowerShell. This year I thought I'd give you a classy present. Or more accurately, a class-based PowerShell toy. Classes were introduced in PowerShell 5.0, primarily with DSC resources in mind, but you can use classes for all sorts of things.","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5310\/a-classy-powershell-christmas\/","og_site_name":"The Lonely Administrator","article_published_time":"2016-12-19T15:44:39+00:00","article_modified_time":"2016-12-19T16:47:42+00:00","og_image":[{"url":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/12\/image_thumb.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":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5310\/a-classy-powershell-christmas\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5310\/a-classy-powershell-christmas\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"A Classy PowerShell Christmas","datePublished":"2016-12-19T15:44:39+00:00","dateModified":"2016-12-19T16:47:42+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5310\/a-classy-powershell-christmas\/"},"wordCount":477,"commentCount":1,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5310\/a-classy-powershell-christmas\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/12\/image_thumb.png","keywords":["Classes","PowerShell"],"articleSection":["PowerShell"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/5310\/a-classy-powershell-christmas\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5310\/a-classy-powershell-christmas\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5310\/a-classy-powershell-christmas\/","name":"A Classy PowerShell Christmas &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5310\/a-classy-powershell-christmas\/#primaryimage"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5310\/a-classy-powershell-christmas\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/12\/image_thumb.png","datePublished":"2016-12-19T15:44:39+00:00","dateModified":"2016-12-19T16:47:42+00:00","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5310\/a-classy-powershell-christmas\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/5310\/a-classy-powershell-christmas\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5310\/a-classy-powershell-christmas\/#primaryimage","url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/12\/image_thumb.png","contentUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/12\/image_thumb.png","width":544,"height":294},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5310\/a-classy-powershell-christmas\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"PowerShell","item":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},{"@type":"ListItem","position":2,"name":"A Classy PowerShell Christmas"}]},{"@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":5319,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/5319\/a-classy-christmas-powershell-module\/","url_meta":{"origin":5310,"position":0},"title":"A Classy Christmas PowerShell Module","author":"Jeffery Hicks","date":"December 20, 2016","format":false,"excerpt":"Yesterday I showed you a class-based PowerShell script. My intention was to have a little bit of fun and teach you the basics of using a class. But what I gave you was really just the first step. If you wanted to create an actual tool around a class, you\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\/2016\/12\/christmas-wreath13.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":8059,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8059\/solving-the-powershell-conversion-challenge\/","url_meta":{"origin":5310,"position":1},"title":"Solving the PowerShell Conversion Challenge","author":"Jeffery Hicks","date":"January 19, 2021","format":false,"excerpt":"Today let's look at how I approached the first Iron Scripter PowerShell challenge of the year. The goal of the challenge was to convert or translate an object into a PowerShell class definition. If you are new to these challenges, the journey to how you achieve the goal is more\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\/2021\/01\/psobject.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/01\/psobject.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/01\/psobject.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/01\/psobject.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/01\/psobject.png?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/01\/psobject.png?resize=1400%2C800&ssl=1 4x"},"classes":[]},{"id":6478,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6478\/powershell-scripting-getting-git-size-retooled\/","url_meta":{"origin":5310,"position":2},"title":"Getting Git Size with PowerShell Retooled","author":"Jeffery Hicks","date":"January 30, 2019","format":false,"excerpt":"A few days ago I wrote about my experiences in designing a PowerShell function that reports on the size of the hidden .git folder. In that version of the function I decided to include a parameter that would permit the user to get the size pre-formatted as either KB, MB\u2026","rel":"","context":"In &quot;Git&quot;","block_context":{"text":"Git","link":"https:\/\/jdhitsolutions.com\/blog\/category\/git\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/01\/image_thumb-29.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/01\/image_thumb-29.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/01\/image_thumb-29.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/01\/image_thumb-29.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":8400,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/8400\/friday-fun-custom-grouping-with-powershell\/","url_meta":{"origin":5310,"position":3},"title":"Friday Fun &#8211; Custom Grouping with PowerShell","author":"Jeffery Hicks","date":"May 14, 2021","format":false,"excerpt":"The other day I was answering a question in the PowerShell Facebook group. This person was getting data from Active Directory and trying to organize the results in a way that met his business requirements. My suggestion was to use Group-Object and a custom grouping property. I am assuming you\u2026","rel":"","context":"In &quot;Active Directory&quot;","block_context":{"text":"Active Directory","link":"https:\/\/jdhitsolutions.com\/blog\/category\/active-directory\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/05\/custom-grouping.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/05\/custom-grouping.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/05\/custom-grouping.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2021\/05\/custom-grouping.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":6974,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6974\/watching-the-watcher-with-powershell\/","url_meta":{"origin":5310,"position":4},"title":"Watching the Watcher with PowerShell","author":"Jeffery Hicks","date":"November 14, 2019","format":false,"excerpt":"If you followed along with my recent articles about my PowerShell based backup system, you may recall that I used a PowerShell scheduled job an an event subscriber to monitor for file changes in key folders that I want to back up. I created the scheduled task to run at\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\/2019\/11\/image_thumb-14.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image_thumb-14.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image_thumb-14.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2019\/11\/image_thumb-14.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":9229,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/9229\/exposing-the-mystery-of-powershell-objects\/","url_meta":{"origin":5310,"position":5},"title":"Exposing the Mystery of PowerShell Objects","author":"Jeffery Hicks","date":"March 14, 2023","format":false,"excerpt":"A few weeks ago, I was working on content for a new PowerShell course for Pluralsight. The subject was objects. We all know the importance of working with objects in PowerShell. Hopefully, you also know that the output you get on your screen from running a PowerShell command is not\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\/2023\/03\/2023-03-14_10-19-52.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2023\/03\/2023-03-14_10-19-52.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2023\/03\/2023-03-14_10-19-52.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/5310","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=5310"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/5310\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=5310"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=5310"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=5310"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}