{"id":73461,"date":"2015-09-09T00:01:00","date_gmt":"2015-09-09T00:01:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2015\/09\/09\/powershell-5-classes-constructor-overloading\/"},"modified":"2022-06-21T13:57:40","modified_gmt":"2022-06-21T20:57:40","slug":"powershell-5-classes-constructor-overloading","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/powershell-5-classes-constructor-overloading\/","title":{"rendered":"PowerShell 5 Classes: Constructor Overloading"},"content":{"rendered":"<p><b style=\"font-size:12px\">Summary<\/b><span style=\"font-size:12px\">: Ed Wilson, Microsoft Scripting Guy, talks about using the new Windows PowerShell 5.0 class feature in Windows 10 and doing constructor overloading.<\/span><\/p>\n<p>Microsoft Scripting Guy, Ed Wilson, is here. Today I want to talk about overloaded constructors. I know, I know, I know\u2026<\/p>\n<p>It sounds like some sort of engineering failure. But that is not the case. In fact, constructor overloading makes your code much more flexible, and even easier to read\u2014when you learn the trick. And today we are going to unmask the secrets of constructor overloading with Windows PowerShell 5.0 classes in Windows 10.<\/p>\n<p>This is way cool stuff, and soon you will be able to entertain friends at night, regal workshop audiences in real-time, and maybe even get more work done sooner and with less effort. After all, that is the real payoff. So let\u2019s get started.<\/p>\n<h2>What\u2019s an overload anyway?<\/h2>\n<p>An overload is more than one way of doing something. So for example, when I call a method and pass one or more parameters to it, that calls for an overloaded method definition. This means in the code, I need to be able to handle one or more ways of doing things. It also means that when I call that method, I have more than one way of calling the method.<\/p>\n<p>A simple example is the <strong>GetProcessesByName<\/strong> method from the System.Diagnostics.Process class. It has two overloads: one in which I pass only the process name and the other where I pass the process name and the name of the computer. This overload definition gives me the ability to return processes locally or remotely. Here are the overload definitions:<\/p>\n<p style=\"margin-left:30px\">\n  PS C:\\Users\\mredw> [System.Diagnostics.Process]::GetProcessesByName\n<\/p>\n<p style=\"margin-left:30px\">\n  OverloadDefinitions\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\n<\/p>\n<p style=\"margin-left:30px\">\n  &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\n<\/p>\n<p style=\"margin-left:30px\">\n  static System.Diagnostics.Process[] GetProcessesByName(string processName)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\n<\/p>\n<p style=\"margin-left:30px\">\n  static System.Diagnostics.Process[] GetProcessesByName(string processName, string\u00a0\u00a0\u00a0\n<\/p>\n<p style=\"margin-left:30px\">\n  machineName) \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\n<\/p>\n<p>Just as I can overload a method definition, I can also overload the constructor. The constructor is what is used to create a new instance of a class.<\/p>\n<p>Remember that when I have a new instance of a class I have created an object. Also remember that a class itself is simply a template for creating objects. I talk about this in my <a href=\"https:\/\/devblogs.microsoft.com\/scripting\/introduction-to-powershell-5-classes\/\" target=\"_blank\" rel=\"noopener\">Introduction to PowerShell 5 Classes<\/a> blog post and in <a href=\"https:\/\/devblogs.microsoft.com\/scripting\/weekend-scripter-introduction-to-powershell-5-classesthe-video\/\" target=\"_blank\" rel=\"noopener\">Introduction to PowerShell 5 classes\u2014The Video<\/a>.<\/p>\n<p>There are also different ways I can create a new instance of a class. As an example, consider the System.DateTime class that represents an instance of date and time. I can create an instance of this class in many different ways. To find these ways, I use the static <strong>New<\/strong> method, for example:<\/p>\n<p style=\"margin-left:30px\">\n  [datetime]::new\n<\/p>\n<p>Here is an image of the overload output:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/hsg-9-9-15-01.jpg\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/hsg-9-9-15-01.jpg\" alt=\"Image of command output\" title=\"Image of command output\" \/><\/a><\/p>\n<h2>Creating overloaded constructors<\/h2>\n<p>To create a constructor (overloaded or otherwise) in a Windows PowerShell 5.0 class, I need to remember that I am really creating a method. The method has the <strong>same name<\/strong> as the class name. When I do this, I have a constructor.<\/p>\n<p>For example, I want to add a constructor to my <strong>Car<\/strong> class (the simple class I talked about in <a href=\"https:\/\/devblogs.microsoft.com\/scripting\/powershell-5-create-simple-class\/\" target=\"_blank\" rel=\"noopener\">PowerShell 5: Create Simple Class<\/a>).<\/p>\n<p style=\"margin-left:30px\">\n  <b style=\"font-size:12px\">Note\u00a0<\/b><span style=\"font-size:12px\"> You also need to understand creating methods because, after all, a constructor is really just a method. For information about methods, please refer to <\/span><a href=\"https:\/\/devblogs.microsoft.com\/scripting\/adding-methods-to-a-powershell-5-class\/\" target=\"_blank\" style=\"font-size:12px\" rel=\"noopener\">Adding Methods to a PowerShell 5 Class<\/a><span style=\"font-size:12px\">.<\/span>\n<\/p>\n<p>Here is the basic <strong>Car<\/strong> class script:<\/p>\n<p style=\"margin-left:30px\">\n  <strong>Class Car<\/strong>\n<\/p>\n<p style=\"margin-left:30px\">\n  {\n<\/p>\n<p style=\"margin-left:30px\">\n  \u00a0\u00a0\u00a0 [String]$vin\n<\/p>\n<p style=\"margin-left:30px\">\n  \u00a0\u00a0\u00a0 static [int]$numberOfWheels = 4\n<\/p>\n<p style=\"margin-left:30px\">\n  \u00a0\u00a0\u00a0 [int]$numberOfDoors\n<\/p>\n<p style=\"margin-left:30px\">\n  \u00a0\u00a0\u00a0 [datetime]$year\n<\/p>\n<p style=\"margin-left:30px\">\n  \u00a0\u00a0\u00a0 [String]$model\n<\/p>\n<p style=\"margin-left:30px\">\n  }\n<\/p>\n<p>Now I add a method with the name of <strong>Car<\/strong>. Here is the syntax:<\/p>\n<p style=\"margin-left:30px\">\n  Name of Class\n<\/p>\n<p style=\"margin-left:30px\">\n  A pair of parentheses for the input\n<\/p>\n<p style=\"margin-left:30px\">\n  A script block that does something\n<\/p>\n<p>All cars have a VIN, so it makes sense to have a VIN input when creating an instance of the class. Here is my constructor:<\/p>\n<p style=\"margin-left:30px\">\n  Car ([string]$vin)\n<\/p>\n<p style=\"margin-left:30px\">\n  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 {$this.vin = $vin}\n<\/p>\n<p>The complete script now looks like this:<\/p>\n<p style=\"margin-left:30px\">\n  <strong>Class Car<\/strong>\n<\/p>\n<p style=\"margin-left:30px\">\n  {\n<\/p>\n<p style=\"margin-left:30px\">\n  \u00a0\u00a0\u00a0 [String]$vin\n<\/p>\n<p style=\"margin-left:30px\">\n  \u00a0\u00a0\u00a0 static [int]$numberOfWheels = 4\n<\/p>\n<p style=\"margin-left:30px\">\n  \u00a0\u00a0\u00a0 [int]$numberOfDoors\n<\/p>\n<p style=\"margin-left:30px\">\n  \u00a0\u00a0\u00a0 [datetime]$year\n<\/p>\n<p style=\"margin-left:30px\">\n  \u00a0\u00a0\u00a0 [String]$model\n<\/p>\n<p style=\"margin-left:30px\">\n  \u00a0\u00a0\u00a0 Car ([string]$vin)\n<\/p>\n<p style=\"margin-left:30px\">\n  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 {$this.vin = $vin}\n<\/p>\n<p style=\"margin-left:30px\">\n  }\n<\/p>\n<p>When I run it and load the class, I can now create a new instance of the class by using my constructor. The syntax is shown here:<\/p>\n<p style=\"margin-left:30px\">\n  PS C:\\> [car]::new(1234)\n<\/p>\n<p style=\"margin-left:30px\">\n  vin\u00a0 numberOfDoors year \u00a0 \u00a0 \u00a0 \u00a0 \u00a0model\n<\/p>\n<p style=\"margin-left:30px\">\n  &#8212;\u00a0 &#8212;&#8212;&#8212;&#8212;- \u00a0 \u00a0 \u00a0 &#8212;- \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &#8212;&#8211;\n<\/p>\n<p style=\"margin-left:30px\">\n  1234\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0 1\/1\/0001 12:00:00 AM \u00a0 \u00a0\u00a0\n<\/p>\n<p>To overload this constructor, I add additional variations\u2014each using the same name. Windows PowerShell will figure out what I want to do. Here I add overloads to my constructor:<\/p>\n<p style=\"margin-left:30px\">\n  <strong>Class Car<\/strong>\n<\/p>\n<p style=\"margin-left:30px\">\n  {\n<\/p>\n<p style=\"margin-left:30px\">\n  \u00a0\u00a0\u00a0 [String]$vin\n<\/p>\n<p style=\"margin-left:30px\">\n  \u00a0\u00a0\u00a0 static [int]$numberOfWheels = 4\n<\/p>\n<p style=\"margin-left:30px\">\n  \u00a0\u00a0\u00a0 [int]$numberOfDoors\n<\/p>\n<p style=\"margin-left:30px\">\n  \u00a0\u00a0\u00a0 [datetime]$year\n<\/p>\n<p style=\"margin-left:30px\">\n  \u00a0\u00a0\u00a0 [String]$model\n<\/p>\n<p style=\"margin-left:30px\">\n  \u00a0\u00a0\u00a0 Car ([string]$vin)\n<\/p>\n<p style=\"margin-left:30px\">\n  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 {$this.vin = $vin}\n<\/p>\n<p style=\"margin-left:30px\">\n  \u00a0\u00a0\u00a0 Car ([string]$vin, [string]$model)\n<\/p>\n<p style=\"margin-left:30px\">\n  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 {$this.vin = $vin\n<\/p>\n<p style=\"margin-left:30px\">\n  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 $this.model = $model}\n<\/p>\n<p style=\"margin-left:30px\">\n  \u00a0\u00a0\u00a0 Car ([string]$vin, [string]$model, [datetime]$year)\n<\/p>\n<p style=\"margin-left:30px\">\n  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 {$this.vin = $vin\n<\/p>\n<p style=\"margin-left:30px\">\n  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 $this.model = $model\n<\/p>\n<p style=\"margin-left:30px\">\n  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 $this.year = $year}\n<\/p>\n<p style=\"margin-left:30px\">\n  \u00a0\u00a0\u00a0 Car ([string]$vin, [string]$model, [datetime]$year, [int]$numberOfDoors)\n<\/p>\n<p style=\"margin-left:30px\">\n  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 {$this.vin = $vin\n<\/p>\n<p style=\"margin-left:30px\">\n  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 $this.model = $model\n<\/p>\n<p style=\"margin-left:30px\">\n  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 $this.year = $year\n<\/p>\n<p style=\"margin-left:30px\">\n  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 $this.numberOfDoors = $numberOfDoors}\n<\/p>\n<p style=\"margin-left:30px\">\n  }\n<\/p>\n<p>The first thing I want to do is to see what overloads I have. This is shown here:<\/p>\n<p style=\"margin-left:30px\">\n  PS C:\\> [car]::new\n<\/p>\n<p style=\"margin-left:30px\">\n  OverloadDefinitions\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\n<\/p>\n<p style=\"margin-left:30px\">\n  &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\n<\/p>\n<p style=\"margin-left:30px\">\n  Car new(string vin)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\n<\/p>\n<p style=\"margin-left:30px\">\n  Car new(string vin, string model)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\n<\/p>\n<p style=\"margin-left:30px\">\n  Car new(string vin, string model, datetime year)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\n<\/p>\n<p style=\"margin-left:30px\">\n  Car new(string vin, string model, datetime year, int numberOfDoors)\u00a0\u00a0\n<\/p>\n<p>This means I can create the car in a variety of methods. Here are a few examples:<\/p>\n<p style=\"margin-left:30px\">\n  PS C:\\> [car]::new(1234)\n<\/p>\n<p style=\"margin-left:30px\">\n  vin\u00a0 numberOfDoors year \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 model\n<\/p>\n<p style=\"margin-left:30px\">\n  &#8212; \u00a0 &#8212;&#8212;&#8212;&#8212;- \u00a0 \u00a0 &#8212;-\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &#8212;&#8211;\n<\/p>\n<p style=\"margin-left:30px\">\n  1234\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0 1\/1\/0001 12:00:00 AM \u00a0 \u00a0\u00a0\n<\/p>\n<p style=\"margin-left:30px\">\n  PS C:\\> [car]::new(1234, &#8220;chevy&#8221;, &#8220;1\/2\/2015&#8221;,3)\n<\/p>\n<p style=\"margin-left:30px\">\n  vin\u00a0 numberOfDoors year \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 model\n<\/p>\n<p style=\"margin-left:30px\">\n  &#8212;\u00a0 &#8212;&#8212;&#8212;&#8212;- \u00a0 \u00a0 &#8212;-\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &#8212;&#8211;\n<\/p>\n<p style=\"margin-left:30px\">\n  1234\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 3 1\/2\/2015 12:00:00 AM chevy\n<\/p>\n<p>That is all there is to using overloaded constructors in PowerShell 5.0. Windows PowerShell 5.0 Class Week\u00a02 will continue tomorrow when I will talk about more way cool stuff.<\/p>\n<p>I invite you to follow me on <a href=\"http:\/\/bit.ly\/scriptingguystwitter\" target=\"_blank\" rel=\"noopener\">Twitter<\/a> and <a href=\"http:\/\/bit.ly\/scriptingguysfacebook\" target=\"_blank\" rel=\"noopener\">Facebook<\/a>. If you have any questions, send email to me at <a href=\"mailto:scripter@microsoft.com\" target=\"_blank\" rel=\"noopener\">scripter@microsoft.com<\/a>, or post your questions on the <a href=\"http:\/\/bit.ly\/scriptingforum\" target=\"_blank\" rel=\"noopener\">Official Scripting Guys Forum<\/a>. See you tomorrow. Until then, peace.<\/p>\n<p><strong>Ed Wilson, Microsoft Scripting Guy<\/strong><span style=\"font-size:12px\">\u00a0<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary: Ed Wilson, Microsoft Scripting Guy, talks about using the new Windows PowerShell 5.0 class feature in Windows 10 and doing constructor overloading. Microsoft Scripting Guy, Ed Wilson, is here. Today I want to talk about overloaded constructors. I know, I know, I know\u2026 It sounds like some sort of engineering failure. But that is [&hellip;]<\/p>\n","protected":false},"author":596,"featured_media":87096,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[615,609,3,4,608,45],"class_list":["post-73461","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-classes","tag-powershell-5","tag-scripting-guy","tag-scripting-techniques","tag-windows-10","tag-windows-powershell"],"acf":[],"blog_post_summary":"<p>Summary: Ed Wilson, Microsoft Scripting Guy, talks about using the new Windows PowerShell 5.0 class feature in Windows 10 and doing constructor overloading. Microsoft Scripting Guy, Ed Wilson, is here. Today I want to talk about overloaded constructors. I know, I know, I know\u2026 It sounds like some sort of engineering failure. But that is [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/73461","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/users\/596"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/comments?post=73461"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/73461\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media\/87096"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media?parent=73461"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=73461"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=73461"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}