{"id":9441,"date":"2006-11-02T23:16:00","date_gmt":"2006-11-02T23:16:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/powershell\/2006\/11\/02\/erroraction-and-errorvariable\/"},"modified":"2019-02-18T13:21:13","modified_gmt":"2019-02-18T20:21:13","slug":"erroraction-and-errorvariable","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/powershell\/erroraction-and-errorvariable\/","title":{"rendered":"-ErrorAction and -ErrorVariable"},"content":{"rendered":"<p><!--\n \/* Font Definitions *\/\n @font-face\n\t{font-family:\"Cambria Math\";\n\tpanose-1:2 4 5 3 5 4 6 3 2 4;}\n@font-face\n\t{font-family:\"Lucida Console\";\n\tpanose-1:2 11 6 9 4 5 4 2 2 4;}\n@font-face\n\t{font-family:\"Arial Black\";\n\tpanose-1:2 11 10 4 2 1 2 2 2 4;}\n \/* Style Definitions *\/\n p.MsoNormal, li.MsoNormal, div.MsoNormal\n\t{margin-top:0in;\n\tmargin-right:0in;\n\tmargin-bottom:10.0pt;\n\tmargin-left:0in;\n\tline-height:115%;\n\tfont-size:11.0pt;\n\tfont-family:\"Lucida Console\";}\nh1\n\t{mso-style-link:\"Heading 1 Char\";\n\tmargin-top:24.0pt;\n\tmargin-right:0in;\n\tmargin-bottom:0in;\n\tmargin-left:0in;\n\tmargin-bottom:.0001pt;\n\tline-height:115%;\n\tpage-break-after:avoid;\n\tfont-size:14.0pt;\n\tfont-family:\"Lucida Console\";\n\tcolor:#365F91;\n\tfont-weight:bold;}\na:link, span.MsoHyperlink\n\t{color:blue;\n\ttext-decoration:underline;}\na:visited, span.MsoHyperlinkFollowed\n\t{color:purple;\n\ttext-decoration:underline;}\np\n\t{margin-right:0in;\n\tmargin-left:0in;\n\tfont-size:12.0pt;\n\tfont-family:\"Times New Roman\",\"serif\";}\np.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph\n\t{margin-top:0in;\n\tmargin-right:0in;\n\tmargin-bottom:10.0pt;\n\tmargin-left:.5in;\n\tline-height:115%;\n\tfont-size:11.0pt;\n\tfont-family:\"Lucida Console\";}\nspan.Heading1Char\n\t{mso-style-name:\"Heading 1 Char\";\n\tmso-style-link:\"Heading 1\";\n\tfont-family:\"Lucida Console\";\n\tcolor:#365F91;\n\tfont-weight:bold;}\np.msolistparagraphcxspfirst, li.msolistparagraphcxspfirst, div.msolistparagraphcxspfirst\n\t{mso-style-name:msolistparagraphcxspfirst;\n\tmargin-top:0in;\n\tmargin-right:0in;\n\tmargin-bottom:0in;\n\tmargin-left:.5in;\n\tmargin-bottom:.0001pt;\n\tline-height:115%;\n\tfont-size:11.0pt;\n\tfont-family:\"Lucida Console\";}\np.msolistparagraphcxspmiddle, li.msolistparagraphcxspmiddle, div.msolistparagraphcxspmiddle\n\t{mso-style-name:msolistparagraphcxspmiddle;\n\tmargin-top:0in;\n\tmargin-right:0in;\n\tmargin-bottom:0in;\n\tmargin-left:.5in;\n\tmargin-bottom:.0001pt;\n\tline-height:115%;\n\tfont-size:11.0pt;\n\tfont-family:\"Lucida Console\";}\np.msolistparagraphcxsplast, li.msolistparagraphcxsplast, div.msolistparagraphcxsplast\n\t{mso-style-name:msolistparagraphcxsplast;\n\tmargin-top:0in;\n\tmargin-right:0in;\n\tmargin-bottom:10.0pt;\n\tmargin-left:.5in;\n\tline-height:115%;\n\tfont-size:11.0pt;\n\tfont-family:\"Lucida Console\";}\nspan.JotestChar\n\t{mso-style-name:\"Jo test Char\";\n\tmso-style-link:\"Jo test\";\n\tfont-family:\"Arial Black\",\"sans-serif\";\n\tbackground:#BFBFBF;\n\tfont-weight:bold;}\np.Jotest, li.Jotest, div.Jotest\n\t{mso-style-name:\"Jo test\";\n\tmso-style-link:\"Jo test Char\";\n\tmargin-top:0in;\n\tmargin-right:0in;\n\tmargin-bottom:10.0pt;\n\tmargin-left:.5in;\n\tline-height:115%;\n\tbackground:#BFBFBF;\n\tfont-size:10.0pt;\n\tfont-family:\"Arial Black\",\"sans-serif\";\n\tfont-weight:bold;}\nspan.CodeChar\n\t{mso-style-name:\"Code Char\";\n\tmso-style-link:Code;\n\tcolor:#EEEDF0;\n\tbackground:#012456;}\np.Code, li.Code, div.Code\n\t{mso-style-name:Code;\n\tmso-style-link:\"Code Char\";\n\tmargin-top:0in;\n\tmargin-right:0in;\n\tmargin-bottom:10.0pt;\n\tmargin-left:.5in;\n\tline-height:115%;\n\tbackground:#012456;\n\tfont-size:10.0pt;\n\tfont-family:\"Lucida Console\";\n\tcolor:#EEEDF0;}\np.msopapdefault, li.msopapdefault, div.msopapdefault\n\t{mso-style-name:msopapdefault;\n\tmargin-right:0in;\n\tmargin-bottom:10.0pt;\n\tmargin-left:0in;\n\tline-height:115%;\n\tfont-size:12.0pt;\n\tfont-family:\"Times New Roman\",\"serif\";}\np.msochpdefault, li.msochpdefault, div.msochpdefault\n\t{mso-style-name:msochpdefault;\n\tmargin-right:0in;\n\tmargin-left:0in;\n\tfont-size:10.0pt;\n\tfont-family:\"Times New Roman\",\"serif\";}\n.MsoChpDefault\n\t{font-size:10.0pt;}\n.MsoPapDefault\n\t{margin-bottom:10.0pt;\n\tline-height:115%;}\n@page Section1\n\t{size:8.5in 11.0in;\n\tmargin:1.0in 1.0in 1.0in 1.0in;}\ndiv.Section1\n\t{page:Section1;}\n--><\/p>\n<div class=\"Section1\">\n<p>Let me take&nbsp;a minute to tell you about 2 of my favorite things in Windows PowerShell:&nbsp; -ErrorAction and \u2013ErrorVariable<\/p>\n<p>You may have heard me talk about being maniacal about doing a great job with error handling &#8230; this is one the cornerstones of our architecture.<\/p>\n<p>Here is the background:&nbsp; Cmdlets are implemented by subclassing a base class.&nbsp; The engine reflects against this class looking for public properties that have a .net attribute on them identifying them as a PARAMETER.&nbsp; Why is this a good idea?&nbsp; Well think about it, the base class can also have public properties with the PARAMETER attribute.&nbsp; And that&#8217;s exactly what we do.&nbsp; We call these Common Parameters (because I failed to convince our writers that it was a noble and worthwhile task to teach the planet the meaning of the word &#8220;ubiquitous&#8221;).&nbsp; <\/p>\n<p>You might be asking yourself &#8211; how would I find out more about common parameters?<br \/>Hmmm&#8230; so you want to &#8220;get help about common parameters&#8221;.&nbsp; Hmmm, I wonder want a good way to express this idea in PowerShell would be &#8230;&#8230;<br \/>How about:&nbsp;<\/p>\n<p class=\"Code\">PS&gt;<span> <b>get-help about_CommonParameters<\/b><\/span><br \/>TOPIC<br \/>&nbsp;&nbsp;&nbsp; Common Parameters<\/p>\n<p>SHORT DESCRIPTION<br \/>&nbsp;&nbsp;&nbsp; Parameters that every cmdlet supports.<\/p>\n<p>LONG DESCRIPTION<br \/>&nbsp;&nbsp;&nbsp; Windows PowerShell includes several common parameters that all<br \/>&nbsp;&nbsp;&nbsp; cmdlets support. This feature provides a consistent interface to<br \/>&nbsp;&nbsp;&nbsp; Windows PowerShell.<\/p>\n<p>&nbsp;&nbsp;&nbsp; When a cmdlet supports a common parameter, the use of the parameter<br \/>&nbsp;&nbsp;&nbsp; does not cause an error. However, the parameter might not have any<br \/>&nbsp;&nbsp;&nbsp; effect in some cmdlets.<\/p>\n<p>&nbsp;&nbsp;&nbsp; The common parameters are:<\/p>\n<p>&nbsp;&nbsp;&nbsp; Parameter&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Description<br \/>&nbsp;&nbsp;&nbsp; &#8212;&#8212;&#8212;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>&nbsp;&nbsp;&nbsp; Verbose&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Boolean. Generates detailed information about the<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; operation, much like tracing or a transaction log.<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; This parameter is effective only in cmdlets that<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; generate verbose data.<\/p>\n<p>&nbsp;&nbsp;&nbsp; Debug&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Boolean. Generates programmer-level detail about the<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; operation. This parameter is effective only in cmdlets<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; that generate debug data.<\/p>\n<p>&nbsp;&nbsp;&nbsp; ErrorAction&nbsp;&nbsp;&nbsp; Enum. Determines how the cmdlet responds when an error<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; occurs. Values are: Continue [default], Stop,<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SilentlyContinue, Inquire.<\/p>\n<p>&nbsp;&nbsp;&nbsp; ErrorVariable&nbsp; String. Specifies a variable that stores errors from<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the command during processing. This variable is<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; populated in addition to $error.<\/p>\n<p>&nbsp;&nbsp;&nbsp; OutVariable&nbsp;&nbsp;&nbsp; String. Specifies a variable that stores output from<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the command during processing.<\/p>\n<p>&nbsp;&nbsp;&nbsp; OutBuffer&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Int32. Determines the number of objects to buffer<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; before calling the next cmdlet in the pipeline.<br \/>&nbsp;<\/p>\n<p>&nbsp;&nbsp;&nbsp; In addition to the common parameters, there are two parameters that<br \/>&nbsp;&nbsp;&nbsp; cmdlets support if they change the system state.<\/p>\n<p>&nbsp;&nbsp;&nbsp; Parameter&nbsp;&nbsp;&nbsp;&nbsp; Description<br \/>&nbsp;&nbsp;&nbsp; &#8212;&#8212;&#8212;&nbsp;&nbsp;&nbsp;&nbsp; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>&nbsp;&nbsp;&nbsp; WhatIf&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Boolean. Explains what will happen if the command is<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; executed, without actually executing the command.<\/p>\n<p>&nbsp;&nbsp;&nbsp; Confirm&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Boolean. Prompts the user for permission before<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; performing any action that modifies the system.<\/p>\n<p>SEE ALSO<br \/>&nbsp;&nbsp;&nbsp; For information about parameters, type:<\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; help about_Parameter<\/p>\n<p><em><b><u>You think it, you type it, you get it.<\/u><\/b><\/em><strong>&nbsp;<\/strong> \ud83d\ude42<\/p>\n<p>&nbsp;So back to -ErrorAction and -ErrorVariable.&nbsp; These are implemented by the engine on behalf of the Cmdlet &#8211; the developer doesn&#8217;t have to do anything.&nbsp; They just call WriteError() and we do the rest.&nbsp; <\/p>\n<p>Here is the easiest way to show this working:<\/p>\n<p class=\"Code\">PS&gt; Stop-Process 13,23<br \/><span>Stop-Process : Cannot find a process with the process identifier 13.<br \/>At line:1 char:13<br \/>+ Stop-Process&nbsp; &lt;&lt;&lt;&lt; 13,23<br \/>Stop-Process : Cannot find a process with the process identifier 23.<br \/>At line:1 char:13<br \/>+ Stop-Process&nbsp; &lt;&lt;&lt;&lt; 13,23<\/p>\n<p><\/span>PS&gt; Stop-Process 13,23 -ErrorAction Stop&nbsp; # Only 1 error<br \/><span>Stop-Process : Command execution stopped because the shell variable &#8220;ErrorA<br \/>ctionPreference&#8221; is set to Stop: Cannot find a process with the process ide<br \/>ntifier 13.<br \/>At line:1 char:13<br \/>+ Stop-Process&nbsp; &lt;&lt;&lt;&lt; 13,23 -ErrorAction Stop&nbsp; # Only 1 error<br \/><\/span><br \/>PS&gt; Stop-Process 13,23 -ErrorAction silentlycontinue&nbsp; # No errors<\/p>\n<p>PS&gt; Stop-Process 13,23 -ErrorAction inquire&nbsp; # ASK<br \/>Confirm<br \/>Cannot find a process with the process identifier 13.<br \/>[Y] Yes&nbsp; [A] Yes to All&nbsp; [H] Halt Command&nbsp; [S] Suspend&nbsp; [?] Help<br \/>(default is &#8220;Y&#8221;):h<br \/><span>Stop-Process : Command execution stopped because the user selected the Halt<br \/>&nbsp;option.<br \/>At line:1 char:13<br \/>+ Stop-Process&nbsp; &lt;&lt;&lt;&lt; 13,23 -ErrorAction inquire&nbsp; # ASK<br \/><\/span>PS&gt;<br \/>PS&gt;<br \/>PS&gt; Stop-Process 13,23 -ErrorVariable a -ErrorAction SilentlyContinue<\/p>\n<p>PS&gt; $a[0]<br \/>Stop-Process : Cannot find a process with the process identifier 13.<br \/>At line:1 char:13<br \/>+ Stop-Process&nbsp; &lt;&lt;&lt;&lt; 13,23 -ErrorVariable a -ErrorAction SilentlyContinue<\/p>\n<p>PS&gt; $a[0] |fl * -Force<\/p>\n<p>Exception&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Microsoft.PowerShell.Commands.ProcessCommandExcepti<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; on: Cannot find a process with the process identifi<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; er 13.<br \/>TargetObject&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : 13<br \/>CategoryInfo&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : ObjectNotFound: (13:Int32) [Stop-Process], ProcessC<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ommandException<br \/>FullyQualifiedErrorId : NoProcessFoundForGivenId,Microsoft.PowerShell.Comma<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nds.StopProcessCommand<br \/>ErrorDetails&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<br \/>InvocationInfo&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : System.Management.Automation.InvocationInfo<\/p>\n<p>PS&gt; $a |ft TargetObject -force -auto<br \/>TargetObject<br \/>&#8212;&#8212;&#8212;&#8212;<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 13<br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 23<\/p>\n<p class=\"MsoNormal\"><span><\/span>&nbsp;<\/p>\n<p class=\"MsoNormal\"><span>Now one thing that is not obvious to people is that you can specify a \u201c+\u201d in front of the variable name for ErrorVariable and we will ADD the errors to that variable.<\/span><\/p>\n<p class=\"Code\">PS&gt; $err=@()<br \/>PS&gt; stop-process 13 -ea silentlycontinue -ErrorVariable err<br \/>PS&gt; $err.count<br \/>1<\/p>\n<p>PS&gt; stop-process 23 -ea silentlycontinue -ErrorVariable +err<br \/>PS&gt; $err.count<br \/>2<br \/>PS&gt; $err<br \/>Stop-Process : Cannot find a process with the process identifier 13.<br \/>At line:1 char:13<br \/>+ stop-process&nbsp; &lt;&lt;&lt;&lt; 13 -ea silentlycontinue -ErrorVariable err<br \/>Stop-Process : Cannot find a process with the process identifier 23.<br \/>At line:1 char:13<br \/>+ stop-process&nbsp; &lt;&lt;&lt;&lt; 23 -ea silentlycontinue -ErrorVariable +err<\/p>\n<p class=\"MsoNormal\"><span>Lastly,&nbsp; you don\u2019t need to type out \u2013ErrorAction or \u2013ErrorVariable, we have defined parameter aliases for these so you can just type \u2013EA and -EV<\/span><\/p>\n<p class=\"MsoNormal\"><span>Enjoy<\/span><\/p>\n<p class=\"MsoNormal\"><span>Jeffrey Snover [MSFT]<br \/>Windows PowerShell\/MMC Architect<br \/>Visit the Windows PowerShell Team blog at:&nbsp;&nbsp;&nbsp; <a href=\"http:\/\/blogs.msdn.com\/PowerShell\">http:\/\/blogs.msdn.com\/PowerShell<\/a><br \/>Visit the Windows PowerShell ScriptCenter at:&nbsp; http:\/\/www.microsoft.com\/technet\/scriptcenter\/hubs\/msh.mspx<\/span><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Let me take&nbsp;a minute to tell you about 2 of my favorite things in Windows PowerShell:&nbsp; -ErrorAction and \u2013ErrorVariable You may have heard me talk about being maniacal about doing a great job with error handling &#8230; this is one the cornerstones of our architecture. Here is the background:&nbsp; Cmdlets are implemented by subclassing a [&hellip;]<\/p>\n","protected":false},"author":600,"featured_media":13641,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-9441","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell"],"acf":[],"blog_post_summary":"<p>Let me take&nbsp;a minute to tell you about 2 of my favorite things in Windows PowerShell:&nbsp; -ErrorAction and \u2013ErrorVariable You may have heard me talk about being maniacal about doing a great job with error handling &#8230; this is one the cornerstones of our architecture. Here is the background:&nbsp; Cmdlets are implemented by subclassing a [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/9441","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/users\/600"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/comments?post=9441"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/9441\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media\/13641"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media?parent=9441"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/categories?post=9441"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/tags?post=9441"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}