{"id":549,"date":"2014-10-11T00:01:00","date_gmt":"2014-10-11T00:01:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2014\/10\/11\/weekend-scripter-use-powershell-to-calculate-and-display-percentages\/"},"modified":"2014-10-11T00:01:00","modified_gmt":"2014-10-11T00:01:00","slug":"weekend-scripter-use-powershell-to-calculate-and-display-percentages","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/weekend-scripter-use-powershell-to-calculate-and-display-percentages\/","title":{"rendered":"Weekend Scripter: Use PowerShell to Calculate and Display Percentages"},"content":{"rendered":"<p><b style=\"font-size:12px\">Summary<\/b><span style=\"font-size:12px\">: Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell to calculate and display percentages.<\/span><\/p>\n<p>Microsoft Scripting Guy, Ed Wilson, is here. This morning, I am sipping a cup of red berry tea. It is tangy and refreshing. I will admit that I cheated. I used our machine. Boom! 90 seconds later it was done. I guess I could actually do that in my sleep.<\/p>\n<p>Of course, I do not make tea in my sleep, but I do sometimes write Windows PowerShell script while I am dozing. When this happens, I need to get to work quickly&mdash;before I forget what I was thinking about.<\/p>\n<p>In Windows 8.1, Windows&nbsp;8, Windows Server&nbsp;2012&nbsp;R2, and Windows Server&nbsp;2012, there is a function named <b>Get-Volume<\/b>. It provides a decent default output, and I use it quite a lot actually.<\/p>\n<p style=\"margin-left:30px\"><b>Note&nbsp;<\/b> This function requires that the Windows PowerShell console or the Windows PowerShell ISE is opened with Administrator rights (or it generates an error message). But the message does not say that you do not have permission or rights. Instead it says, &ldquo;Access to a CIM resource was not available to the client.&rdquo; To figure out that it is a permission denied scenario, I need to look a bit further in the error message, where I will see the following: &ldquo;+ CategoryInfo&nbsp; : PermissionDenied:&rdquo;<\/p>\n<p>Here is the standard output from the <b>Get-Volume<\/b> function:<\/p>\n<p style=\"margin-left:30px\">PS C:\\&gt; get-volume<\/p>\n<p style=\"margin-left:30px\">DriveLetter&nbsp; FileSystemLabel &nbsp;FileSystem DriveType &nbsp;HealthStatus &nbsp;SizeRemaining &nbsp;Size<\/p>\n<p style=\"margin-left:30px\">&#8212;&#8212;&#8212;&#8211; &nbsp; &nbsp; &#8212;&#8212;&#8212;&#8212; &nbsp; &nbsp; &nbsp;&#8212;&#8212;&#8212;- &nbsp; &nbsp;&#8212;&#8212;&#8212; &nbsp; &nbsp; &nbsp; &#8212;&#8212;&#8212;&#8212; &nbsp; &nbsp; &nbsp; &#8212;&#8212;&#8212;&#8212; &nbsp; &nbsp; &nbsp;&#8212;-<\/p>\n<p style=\"margin-left:30px\">&nbsp; &nbsp; &nbsp;C &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SSD &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NTFS &nbsp; &nbsp; &nbsp; &nbsp;Fixed &nbsp; &nbsp; &nbsp; Healthy &nbsp; &nbsp; &nbsp; &nbsp;72.65 GB &nbsp; &nbsp;148.53 GB<\/p>\n<p style=\"margin-left:30px\">&nbsp; &nbsp; &nbsp;E&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; HybridTer&#8230; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;NTFS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Fixed &nbsp; &nbsp; &nbsp;Healthy &nbsp; &nbsp; &nbsp; &nbsp;560.81 GB &nbsp; 931.39 GB<\/p>\n<p style=\"margin-left:30px\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Recovery &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NTFS &nbsp; &nbsp; &nbsp; &nbsp;Fixed &nbsp; &nbsp; &nbsp; Healthy &nbsp; &nbsp; &nbsp; &nbsp;22.96 MB &nbsp; &nbsp; &nbsp;300 MB<\/p>\n<p>I like the drive letter, label, size, and size remaining. &nbsp;I already know the drives are fixed, and I am glad that they do not have any social diseases and are therefore healthy. But what I want to know is the percentage of utilization. I really cannot do a whole lot with the statistic &quot;150 GB,&quot; but if I see that it is 85% utilized, I know that maybe I am starting to have an issue.<\/p>\n<p>I can obtain this same information by using Windows PowerShell&nbsp;2.0 (or even Windows PowerShell&nbsp;4.0 on Windows&nbsp;7) by directly querying the WMI class. Here is an example:<\/p>\n<p style=\"margin-left:30px\">Get-CimInstance win32_volume | Select DriveLetter, Label, FileSystem, DriveTYpe, FreeSpace, Capacity<\/p>\n<p>Following is the output from this command. I would need to do a bit more work to display the output in gigabytes and in megabytes. I wrote a function a long time ago that I would use to display the output in the appropriately sized units.<\/p>\n<p style=\"margin-left:30px\">DriveLetter : C:<\/p>\n<p style=\"margin-left:30px\">Label&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : SSD<\/p>\n<p style=\"margin-left:30px\">FileSystem&nbsp; : NTFS<\/p>\n<p style=\"margin-left:30px\">DriveTYpe&nbsp;&nbsp; : 3<\/p>\n<p style=\"margin-left:30px\">FreeSpace&nbsp;&nbsp; : 78011699200<\/p>\n<p style=\"margin-left:30px\">Capacity&nbsp;&nbsp;&nbsp; : 159486308352<\/p>\n<p>&nbsp;<\/p>\n<p style=\"margin-left:30px\">DriveLetter : E:<\/p>\n<p style=\"margin-left:30px\">Label&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : HybridTerrabyte<\/p>\n<p style=\"margin-left:30px\">FileSystem&nbsp; : NTFS<\/p>\n<p style=\"margin-left:30px\">DriveTYpe&nbsp;&nbsp; : 3<\/p>\n<p style=\"margin-left:30px\">FreeSpace&nbsp;&nbsp; : 602152972288<\/p>\n<p style=\"margin-left:30px\">Capacity&nbsp;&nbsp;&nbsp; : 1000068870144<\/p>\n<p>&nbsp;<\/p>\n<p style=\"margin-left:30px\">DriveLetter :<\/p>\n<p style=\"margin-left:30px\">Label&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Recovery<\/p>\n<p style=\"margin-left:30px\">FileSystem&nbsp; : NTFS<\/p>\n<p style=\"margin-left:30px\">DriveTYpe&nbsp;&nbsp; : 3<\/p>\n<p style=\"margin-left:30px\">FreeSpace&nbsp;&nbsp; : 24080384<\/p>\n<p style=\"margin-left:30px\">Capacity&nbsp;&nbsp;&nbsp; : 314568704<\/p>\n<h2>Getting the percentage volume utilization<\/h2>\n<p>In the past, I would always make the calculation, and then format the output. Following, is an example of doing that. (This is a one-line command that I broke at the pipe character.)<\/p>\n<p style=\"margin-left:30px\">PS C:\\&gt; get-volume |<\/p>\n<p style=\"margin-left:30px\">select driveletter, FilesystemLabel, @{L=&#039;pct used&#039;;E={&quot;{0:N2}&quot; -f (($_.sizeremaining\/$_.size)*100)}}<\/p>\n<p>&nbsp;<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; driveletter FilesystemLabel &nbsp; &nbsp; &nbsp;pct used<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8212;&#8212;&#8212;&#8211; &nbsp; &nbsp; &#8212;&#8212;&#8212;&#8212;&#8212; &nbsp; &nbsp; &nbsp;&#8212;&#8212;&#8211;<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C SSD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 48.91<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E HybridTerrabyte&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 60.23<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Recovery&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7.66<\/p>\n<p>That works, but it is actually quite a bit of work, and it is not all that easy to understand. I am using conditional formatting, and I am specifying that I want a number with two decimal places. It is pretty easy to get this wrong.<\/p>\n<p>I was thinking about this last night, and I realized there is a much easier way to accomplish the same task. It also gives me quite a bit of control over the process. I am going to create a new instance of the <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/system.globalization.cultureinfo(v=vs.110).aspx\" target=\"_blank\">System.Globalization.CultureInfo<\/a> class, and specify <b>en-us<\/b> culture. I store the returned object in the <b>$nfi<\/b> variable. Here is that line:<\/p>\n<p style=\"margin-left:30px\">$nfi = New-Object System.Globalization.CultureInfo -ArgumentList &quot;en-us&quot;,$false<\/p>\n<p>Now I decide that I want to define the number of digits used for percentages to be four decimal places. (For more information, see <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/system.globalization.numberformatinfo.percentdecimaldigits(v=vs.110).aspx\" target=\"_blank\">NumberFormatInfo.PercentDecimalDigits Property<\/a>.) This is a straightforward value assignment, as shown here:<\/p>\n<p style=\"margin-left:30px\">$nfi.NumberFormat.PercentDecimalDigits = 4<\/p>\n<p>Now that I have done that, I am going to use the <b>ToString<\/b> method from the numbers and specify that I want percentage number formatting (see <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/dwhawy9k(v=vs.110).aspx#PFormatString\" target=\"_blank\">The Percent (&quot;P&quot;) Format Specifier<\/a>). I also specify my customized <b>CultureInfo<\/b> object with the custom number format for decimal places for percentages. Here is the command (again, it is a single line that is broken at the pipe character):<\/p>\n<p style=\"margin-left:30px\">get-volume |<\/p>\n<p style=\"margin-left:30px\">select driveletter, FilesystemLabel, @{L=&#039;pct used&#039;;E={($_.sizeremaining\/$_.size).ToString(&quot;P&quot;, $nfi)}}<\/p>\n<p>The command the associated output are shown here:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/hsg-10-11-14-01.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/hsg-10-11-14-01.png\" alt=\"Image of command output\" title=\"Image of command output\" \/><\/a><\/p>\n<p>This is actually easier than it looks. For example, if I do not want to customize the way my percentages display, I can use the default. There is already an instance the <b>CultureInfo<\/b> class at work in the Windows PowerShell console. I can examine it by using the <b>Get-Culture<\/b> cmdlet, as shown here:<\/p>\n<p style=\"margin-left:30px\">PS C:\\&gt; $c = Get-Culture<\/p>\n<p style=\"margin-left:30px\">PS C:\\&gt; $c.NumberFormat.PercentDecimalDigits<\/p>\n<p style=\"margin-left:30px\">2<\/p>\n<p>By not specifying a custom number format, I can use these defaults. This is shown here:<\/p>\n<p style=\"margin-left:30px\">PS C:\\&gt; get-volume |<\/p>\n<p style=\"margin-left:30px\">select driveletter, FilesystemLabel, @{L=&#039;pct used&#039;;E={($_.sizeremaining\/$_.size).ToString(&quot;P&quot;)}}<\/p>\n<p>&nbsp;<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; driveletter FilesystemLabel &nbsp; &nbsp; &nbsp;pct used<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8212;&#8212;&#8212;&#8211; &nbsp; &nbsp; &nbsp;&#8212;&#8212;&#8212;&#8212;&#8212; &nbsp; &nbsp; &nbsp;&#8212;&#8212;&#8211;<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C SSD&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;48.91 %<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E HybridTerrabyte&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 60.23 %<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Recovery&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7.66 %<\/p>\n<p>If I want to change the default behavor, for example, for the number of percentage decimal places, I simply write a new value, as shown here:<\/p>\n<p style=\"margin-left:30px\">PS C:\\&gt; $c = Get-Culture<\/p>\n<p style=\"margin-left:30px\">PS C:\\&gt; $c.NumberFormat.PercentDecimalDigits = 4<\/p>\n<p style=\"margin-left:30px\">PS C:\\&gt; get-volume | select driveletter, FilesystemLabel, @{L=&#039;pct used&#039;;E={($_.sizeremain<\/p>\n<p style=\"margin-left:30px\">ing\/$_.size).ToString(&quot;P&quot;)}}<\/p>\n<p>&nbsp;<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;driveletter FilesystemLabel &nbsp; &nbsp; &nbsp; pct used<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8212;&#8212;&#8212;&#8211; &nbsp; &nbsp; &#8212;&#8212;&#8212;&#8212;&#8212; &nbsp; &nbsp; &nbsp; &#8212;&#8212;&#8211;<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C SSD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 48.9057 %<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E HybridTerrabyte&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 60.2304 %<\/p>\n<p style=\"margin-left:30px\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Recovery&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7.6550 %<\/p>\n<p>This behavior will exist until I close the Windows PowerShell console. If I want a permanent solution, I add the command to my Windows PowerShell profile.<\/p>\n<p>I hope you have an awesome day, and I will see you tomorrow.<\/p>\n<p>I invite you to follow me on <a href=\"http:\/\/bit.ly\/scriptingguystwitter\" target=\"_blank\">Twitter<\/a> and <a href=\"http:\/\/bit.ly\/scriptingguysfacebook\" target=\"_blank\">Facebook<\/a>. If you have any questions, send email to me at <a href=\"mailto:scripter@microsoft.com\" target=\"_blank\">scripter@microsoft.com<\/a>, or post your questions on the <a href=\"http:\/\/bit.ly\/scriptingforum\" target=\"_blank\">Official Scripting Guys Forum<\/a>. See you tomorrow. Until then, peace.<\/p>\n<p><b>Ed Wilson, Microsoft Scripting Guy<\/b><span style=\"font-size:12px\">&nbsp;<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary: Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell to calculate and display percentages. Microsoft Scripting Guy, Ed Wilson, is here. This morning, I am sipping a cup of red berry tea. It is tangy and refreshing. I will admit that I cheated. I used our machine. Boom! 90 seconds later it was [&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":[51,3,4,61,45],"class_list":["post-549","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-getting-started","tag-scripting-guy","tag-scripting-techniques","tag-weekend-scripter","tag-windows-powershell"],"acf":[],"blog_post_summary":"<p>Summary: Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell to calculate and display percentages. Microsoft Scripting Guy, Ed Wilson, is here. This morning, I am sipping a cup of red berry tea. It is tangy and refreshing. I will admit that I cheated. I used our machine. Boom! 90 seconds later it was [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/549","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=549"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/549\/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=549"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=549"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=549"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}