{"id":52393,"date":"2009-09-24T03:01:00","date_gmt":"2009-09-24T03:01:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2009\/09\/24\/hey-scripting-guy-can-i-unlock-a-read-only-file-edit-it-and-make-it-read-only-again\/"},"modified":"2009-09-24T03:01:00","modified_gmt":"2009-09-24T03:01:00","slug":"hey-scripting-guy-can-i-unlock-a-read-only-file-edit-it-and-make-it-read-only-again","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/hey-scripting-guy-can-i-unlock-a-read-only-file-edit-it-and-make-it-read-only-again\/","title":{"rendered":"Hey, Scripting Guy! Can I &#8220;Unlock&#8221; a Read-Only File, Edit it, and Make It Read-Only Again?"},"content":{"rendered":"<p><!-- AddThis Button BEGIN --><a class=\"addthis_button\" href=\"http:\/\/www.addthis.com\/bookmark.php?v=250&amp;pub=scriptingguys\"><img decoding=\"async\" alt=\"Bookmark and Share\" width=\"125\" height=\"16\" src=\"http:\/\/s7.addthis.com\/static\/btn\/v2\/lg-share-en.gif\"><\/a><!-- AddThis Button END --><span><span><span><img decoding=\"async\" title=\"Hey, Scripting Guy! Question\" border=\"0\" alt=\"Hey, Scripting Guy! Question\" align=\"left\" width=\"34\" height=\"34\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/q-for-powertip.jpg\"><\/span><\/span><\/span>Hey, Scripting Guy! We have a number of files that we need to access at work from time to time. To protect these files, we make them read-only. This works great from a file protection standpoint, but it is really annoying when I need to make updates to the file because about half the time I will open a file, make the edits, and forget to clear the read-only attribute. When I go to save my changes, that is when I am reminded that the file is read-only and it forces me to save the changes to a new file. Then I have to go back to the folder, rename the original file, and then rename the modified file to the original file name. All this ends up costing me an extra five minutes of frustration and annoyance. I wish I had a script I could use that would clear the read-only attribute from all files in a folder. I could use that script before I start to work. Then if I had another script that would set the read-only attribute back to the files it would be great. What do you think? Could you hook me up with a couple of scripts or what?<\/p>\n<p>&lt;<\/p>\n<p>p style=&#8221;MARGIN: 0in 0in 8pt&#8221; class=&#8221;MsoNormal&#8221;&gt;&#8211; LM<\/p>\n<p><font size=\"3\"><img decoding=\"async\" title=\"Hey, Scripting Guy! Answer\" border=\"0\" alt=\"Hey, Scripting Guy! Answer\" align=\"left\" width=\"34\" height=\"34\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/a-for-powertip.jpg\"><\/font><\/p>\n<p class=\"MsoNormal\">Hello LM, Microsoft Scripting Guy Ed Wilson here. <\/p>\n<p class=\"MsoNormal\">It is a cloudy overcast day in <a href=\"http:\/\/en.wikipedia.org\/wiki\/Charlotte,_North_Carolina\"><font face=\"Segoe\">Charlotte, North Carolina<\/font><\/a>, in the United States today. You would, of course, already know this, if you had <a href=\"http:\/\/www.facebook.com\/Mr.Ed.Wilson\"><font face=\"Segoe\">friended me on Facebook<\/font><\/a>. I am sipping a cup of <a href=\"http:\/\/en.wikipedia.org\/wiki\/Gunpowder_tea\"><font face=\"Segoe\">Gunpowder Green Tea<\/font><\/a> with a real <a href=\"http:\/\/en.wikipedia.org\/wiki\/Cinnamon\"><font face=\"Segoe\">cinnamon<\/font><\/a> stick and <a href=\"http:\/\/en.wikipedia.org\/wiki\/Cymbopogon\"><font face=\"Segoe\">lemon grass<\/font><\/a> in it. I am listening to the <a href=\"http:\/\/en.wikipedia.org\/wiki\/The_Beach_Boys\"><font face=\"Segoe\">Beach Boys<\/font><\/a> on my <a href=\"http:\/\/www.zune.net\/en-US\/\"><font face=\"Segoe\">newly upgraded Zune<\/font><\/a>, and watching the <a href=\"https:\/\/twitter.com\/scriptingguys\/\">ScriptingGuys on Twitter<\/a> via my <a href=\"http:\/\/www.sobees.com\/bdule\"><font face=\"Segoe\">bDule<\/font><\/a> software. I am in a good mood, and things are going great. <\/p>\n<p class=\"MsoNormal\">LM, I decided to write a single script that will display all read-only files in a folder, allow you to clear the read-only attribute, and then reset the read-only attribute. To use the script, you specify the path to the folder, and then use the appropriate switch to get, clear, or set the read-only attribute. The WorkWithReadOnlyFiles.ps1 script is pretty cool, and is seen here. <\/p>\n<p class=\"CodeBlockScreenedHead\"><b>WorkWithReadOnlyFiles.ps1<\/p>\n<p><\/b><\/p>\n<p class=\"CodeBlockScreened\"><span><font><font face=\"Lucida Sans Typewriter\">Param ([string]$path=&#8217;c:fso&#8217;,<br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>[switch]$get,<br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>[switch]$clear,<br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>[switch]$set,<br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>[switch]$help<br>)#end param<br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><br># *** Functions here ***<\/p>\n<p>Function Get-ReadOnlyFiles([string]$path)<br>{ <br><span>&nbsp;<\/span>&#8220;Getting readonly attribute on files in $path&#8221;<br><span>&nbsp;<\/span>Get-ChildItem -Path $path |<br><span>&nbsp;<\/span>Where-Object { $_.attributes -match &#8216;readonly&#8217; } <br>} #end get-Readonlyfiles<\/p>\n<p>Function Clear-ReadOnlyFiles([string]$path)<br>{<br><span>&nbsp; <\/span>&#8220;Clearing readonly attribute from files in $path&#8221;<br><span>&nbsp;<\/span>New-Variable -Name read_only -Value 1 -Option readonly<br><span>&nbsp;<\/span>Get-ChildItem -Path $path |<br><span>&nbsp;<\/span>Where-Object { $_.attributes -match &#8216;readonly&#8217; } |<br><span>&nbsp;<\/span>ForEach-Object {<br><span>&nbsp;&nbsp; <\/span>$_.attributes = $_.attributes -Bxor $read_only }<br>}#end Clear-ReadonlyFiles<\/p>\n<p>Function Set-ReadOnlyFiles([string]$path)<br>{ <br><span>&nbsp;<\/span>&#8220;Setting readonly attribute on files in $path&#8221;<br><span>&nbsp;<\/span>New-Variable -Name read_only -Value 1 -Option readonly<br><span>&nbsp;<\/span>Get-ChildItem -Path $path |<br><span>&nbsp;<\/span>ForEach-Object {<br><span>&nbsp;&nbsp; <\/span>$_.attributes = [int]$_.attributes + $read_only<br><span>&nbsp;<\/span>}<br>}#end Set-ReadOnlyFiles<\/p>\n<p>Function Get-HelpText<br>{<br><span>&nbsp;<\/span>$helpText = @&#8221;<br><span>&nbsp; <\/span>WorkWithReadOnlyFiles.ps1 -path c:fso -get<br><span>&nbsp; <\/span>Gets a list of all readonly files in c:fso folder<br><span>&nbsp; <\/span><br><span>&nbsp; <\/span>WorkWithReadOnlyFiles.ps1 -path c:fso -set<br><span>&nbsp; <\/span>Sets all files in the c:fso folder to readonly<br><span>&nbsp; <\/span><br><span>&nbsp; <\/span>WorkWithReadOnlyFiles.ps1 -path c:fso -clear<br><span>&nbsp; <\/span>Clears the readonly attribute from all files in c:fso folder<br>&#8220;@<br><span>&nbsp;<\/span>$helpText<br>}#end Get-HelpText<\/p>\n<p># *** Entry Point to Script ***<br>$clear = $true<br>if($help) { Get-HelpText ; exit }<br>if(!$path) { &#8220;A path is required.&#8221; ; Get-HelpText ; exit }<br>if($get) { Get-ReadOnlyFiles -path $path ; exit }<br>if($clear) { Clear-ReadOnlyFiles -path $path ; exit }<br>if($set) { Set-ReadonlyFiles -path $path ; exit }<\/p>\n<p><\/font><\/font><\/span><\/p>\n<p class=\"MsoNormal\">LM, the WorkWithReadOnlyFiles.ps1 script begins by creating some command-line parameters. The <b>&ndash;path<\/b> parameter is a string and is used to specify the target folder. The remaining parameters are all switched parameters. The <b>&ndash;get<\/b> parameter is used to tell the script to retrieve a list of all the read-only files in the folder. The <b>&ndash;clear<\/b> parameter removes the read-only attribute from all files in the target folder. The <b>&ndash;help<\/b> switch is used to display Help text on the Windows PowerShell console. The parameter section of the script is seen here. <\/p>\n<p class=\"CodeBlock\"><span><font face=\"Lucida Sans Typewriter\">Param ([string]$path,<br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>[switch]$get,<br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>[switch]$clear,<br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>[switch]$set,<br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>[switch]$help<br>)#end param<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"MsoNormal\">The <b>Get-ReadOnlyFiles<\/b> function is used to list the read-only files in the directory that is stored in the <b>$path<\/b> variable. This function will find files that have the read-only attribute set. An example of such a file is seen here:<\/p>\n<p class=\"Fig-Graphic\"><img decoding=\"async\" title=\"Image of a read-only file\" alt=\"Image of a read-only file\" width=\"367\" height=\"502\" src=\"http:\/\/img.microsoft.com\/library\/media\/1033\/technet\/images\/scriptcenter\/qanda\/hsg\/2009\/september\/hey0924\/hsg-09-24-09-01.jpg\"><\/p>\n<p class=\"MsoNormal\">&nbsp;<\/p>\n<p class=\"MsoNormal\">The <b>Get-ReadOnlyFiles<\/b> function is very useful, because by default the folder view for Windows Explorer does not list read-only files:<\/p>\n<p class=\"Fig-Graphic\"><img decoding=\"async\" title=\"Image of Windows Explorer default view not shoing read-only files\" alt=\"Image of Windows Explorer default view not shoing read-only files\" width=\"600\" height=\"268\" src=\"http:\/\/img.microsoft.com\/library\/media\/1033\/technet\/images\/scriptcenter\/qanda\/hsg\/2009\/september\/hey0924\/hsg-09-24-09-02.jpg\"><\/p>\n<p class=\"Fig-Graphic\">&nbsp;<\/p>\n<p class=\"MsoNormal\">The first thing the function does is display a status message on the Windows PowerShell console that indicates that the read-only files in the path stored in the <b>$path<\/b> variable are being identified. After the status message has been displayed, the <b>Get-ChildItem<\/b> cmdlet (which performs a functionality similar to the old DOS <b>Dir<\/b> command) is used to find all the files that are in the folder that is specified by the <b>$path<\/b> variable. Because the <b>Get-ChildItem<\/b> cmdlet&rsquo;s <b>&ndash;recurse<\/b> parameter is not used, the <b>Get-ReadOnlyFiles<\/b> will only work with a single folder at a time. You could supply multiple folders via the <b>-path<\/b> parameter because the <b>Get-ChildItem<\/b> cmdlet&#8217;s <b>&ndash;path<\/b> parameter will accept an array of strings; however, the <b>$path<\/b> variable is identified as a <b>[string]<\/b>, which is a singleton, and not as a <b>[string[]]<\/b>, which is an array. If you want to modify the script to accept multiple paths, you will need to change all the <b>[string$path<\/b> commands to <b>[string[]]$path<\/b>. If you did that, you would be able to call the script as seen here: <\/p>\n<p class=\"CodeBlock\"><span><font face=\"Lucida Sans Typewriter\">WorkWithReadOnlyFiles.ps1 -path &#8220;c:fso&#8221;,&#8221;c:fso1&#8243; &ndash;get<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"MsoNormal\">After the <b>Get-ChildItem<\/b> cmdlet retrieves the files, it passes them along the pipeline to the <b>Where-Object<\/b> cmdlet. The <b>Where-Object<\/b> cmdlet is used to look for an attribute that matches <b>&#8216;readonly&#8217;<\/b>; when this is found, the <b>filename<\/b>, <b>last write time<\/b>, and other information about the file will be displayed. The complete <b>Get-ReadOnlyFIles<\/b> function is seen here: <\/p>\n<p class=\"CodeBlock\"><span><font face=\"Lucida Sans Typewriter\">Function Get-ReadOnlyFiles([string]$path)<br>{ <br><span>&nbsp;<\/span>&#8220;Getting readonly attribute on files in $path&#8221;<br><span>&nbsp;<\/span>Get-ChildItem -Path $path |<br><span>&nbsp;<\/span>Where-Object { $_.attributes -match &#8216;readonly&#8217; } <br>} #end get-Readonlyfiles<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"MsoNormal\">The <b>Clear-ReadOnlyFiles<\/b> function is used to remove the read-only attribute from all the files in the folder. A read-only variable is created that is named <b>read_only<\/b>. This variable is set to a value of 1. It is read-only because you do not want to be able to change the value of the variable, not because it is used to hold the value of the file attribute <b>readonly<\/b>. Once the <b>read-only<\/b> variable is created, the <b>Get-ChildItem<\/b> cmdlet is used to retrieve the files from the folder, and the <b>Where-Object<\/b> cmdlet is used to filter out the <b>readonly<\/b> files. The results of that are piped to the <b>ForEach-Object<\/b> cmdlet where an <b>XOR<\/b> is taken with the value of the <b>attributes<\/b> property. The <b>-Bxor<\/b> operator is used to perform the <b>XOR<\/b> operation. <\/p>\n<p class=\"Readeraidonly\">For more information about performing an XOR with file attributes, refer to the <a href=\"http:\/\/www.microsoft.com\/technet\/scriptcenter\/guide\/sas_scr_tspz.mspx\"><font face=\"Segoe\">Scripting Guide<\/font><\/a> or to the Microsoft Press book, <a href=\"http:\/\/www.microsoft.com\/MSPress\/books\/authors\/auth10329.aspx\"><font face=\"Segoe\">Microsoft PowerShell Step By Step<\/font><\/a>.<\/p>\n<p class=\"MsoNormal\">When the <b>Clear-ReadOnlyFiles<\/b> function is run, the read-only attribute from all the files is removed. This is seen here:<\/p>\n<p class=\"Fig-Graphic\"><img decoding=\"async\" title=\"Image of read-only file attribute being removed from all files\" alt=\"Image of read-only file attribute being removed from all files\" width=\"367\" height=\"502\" src=\"http:\/\/img.microsoft.com\/library\/media\/1033\/technet\/images\/scriptcenter\/qanda\/hsg\/2009\/september\/hey0924\/hsg-09-24-09-03.jpg\"><\/p>\n<p class=\"Fig-Graphic\">&nbsp;<\/p>\n<p class=\"MsoNormal\">The complete <b>Clear-ReadOnlyFiles<\/b> function is seen here. <\/p>\n<p class=\"CodeBlock\"><span><font face=\"Lucida Sans Typewriter\">Function Clear-ReadOnlyFiles([string]$path)<br>{<br><span>&nbsp; <\/span>&#8220;Clearing readonly attribute from files in $path&#8221;<br><span>&nbsp;<\/span>New-Variable -Name read_only -Value 1 -Option readonly<br><span>&nbsp;<\/span>Get-ChildItem -Path $path |<br><span>&nbsp;<\/span>Where-Object { $_.attributes -match &#8216;readonly&#8217; } |<br><span>&nbsp;<\/span>ForEach-Object {<br><span>&nbsp;&nbsp; <\/span>$_.attributes = $_.attributes -Bxor $read_only }<br>}#end Clear-ReadonlyFiles<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"MsoNormal\">The <b>Set-ReadOnlyFiles<\/b> function is used to set the read-only attribute on each file in the folder specified by the value of the <b>$path<\/b> variable. The first thing it does is display a status message on the Windows PowerShell console that states the read-only attribute will be set. Next, the <b>Get-ChildItem<\/b> cmdlet is used to retrieve all of the files from the folder. There is no need to use the <b>Where-Object<\/b> cmdlet to filter out files that are read-only because the read-only attribute will be applied to each file as it passes over the pipeline. The <b>[int]<\/b> class is used to convert the value in the <b>attributes<\/b> property into a number to allow us to add the number 1 (which represents a read-only file) to the value stored in the <b>attributes<\/b> property. This is seen here: <\/p>\n<p class=\"CodeBlock\"><span><font face=\"Lucida Sans Typewriter\">Function Set-ReadOnlyFiles([string]$path)<br>{ <br><span>&nbsp;<\/span>&#8220;Setting readonly attribute on files in $path&#8221;<br><span>&nbsp;<\/span>New-Variable -Name read_only -Value 1 -Option readonly<br><span>&nbsp;<\/span>Get-ChildItem -Path $path |<br><span>&nbsp;<\/span>ForEach-Object {<br><span>&nbsp;&nbsp; <\/span>$_.attributes = [int]$_.attributes + $read_only<br><span>&nbsp;<\/span>}<br>}#end Set-ReadOnlyFiles<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"MsoNormal\">The <b>Get-HelpText<\/b> function uses a <b>here-string<\/b> to store the Help text for the script. The use of a <b>here-string<\/b> to create Help text was discussed in <a href=\"http:\/\/blogs.technet.com\/heyscriptingguy\/archive\/2009\/09\/23\/hey-scripting-guy-september-23-2009.aspx\">yesterday&rsquo;s Hey, Scripting Guy! post<\/a>. The complete <b>Get-HelpText<\/b> function is shown here: <\/p>\n<p class=\"CodeBlock\"><span><font face=\"Lucida Sans Typewriter\">Function Get-HelpText<br>{<br><span>&nbsp;<\/span>$helpText = @&#8221;<br><span>&nbsp; <\/span>WorkWithReadOnlyFiles.ps1 -path c:fso -get<br><span>&nbsp; <\/span>Gets a list of all readonly files in c:fso folder<br><span>&nbsp; <\/span><br><span>&nbsp; <\/span>WorkWithReadOnlyFiles.ps1 -path c:fso -set<br><span>&nbsp; <\/span>Sets all files in the c:fso folder to readonly<br><span>&nbsp; <\/span><br><span>&nbsp; <\/span>WorkWithReadOnlyFiles.ps1 -path c:fso -clear<br><span>&nbsp; <\/span>Clears the readonly attribute from all files in c:fso folder<br>&#8220;@<br><span>&nbsp;<\/span>$helpText<br>}#end Get-HelpText<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"MsoNormal\">The entry point to the script is used to parse the value of the command-line switches. If a switched parameter is used, the variable represented by the parameter will exist. If a switched parameter is not used, the variable will not exist. The <b>if<\/b> statement can be used to check for the presence of the variables. When a variable is detected, the appropriate function is called. Because the script will not work if you do not supply a path to check for the existence of read-only files, if the value of the <b>$path<\/b> variable is not detected, a string indicating that the path is required is displayed, and the <b>Get-HelpText<\/b> function is called. After that has been done, the script is exited. This is seen here:<\/p>\n<p class=\"CodeBlock\"><span><font face=\"Lucida Sans Typewriter\">if($help) { Get-HelpText ; exit }<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlock\"><span><font face=\"Lucida Sans Typewriter\">if(!$path) { &#8220;A path is required.&#8221; ; Get-HelpText ; exit }<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlock\"><span><font face=\"Lucida Sans Typewriter\">if($get) { Get-ReadOnlyFiles -path $path ; exit }<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlock\"><span><font face=\"Lucida Sans Typewriter\">if($clear) { Clear-ReadOnlyFiles -path $path ; exit }<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlock\"><span><font face=\"Lucida Sans Typewriter\">if($set) { Set-ReadonlyFiles -path $path ; exit }<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"MsoNormal\">Well, LM, that is about all there is to working with read-only files. Hope you enjoyed this as much as I did.<\/p>\n<p class=\"MsoNormal\">If you want to know exactly what we will be looking at tomorrow, follow us on <a target=\"_blank\" href=\"http:\/\/www.twitter.com\/scriptingguys\/\">Twitter<\/a> or <a target=\"_blank\" href=\"http:\/\/www.new.facebook.com\/group.php?gid=5901799452\"><font face=\"Segoe\">Facebook<\/font><\/a>. If you have any questions, send e-mail to us at <a target=\"_blank\" href=\"http:\/\/blogs.technet.commailto:scripter@microsoft.com\">scripter@microsoft.com<\/a> or post them on the <a target=\"_blank\" href=\"http:\/\/social.technet.microsoft.com\/Forums\/en\/ITCG\/threads\/\">Official Scripting Guys Forum<\/a>. See you tomorrow. Until then, peace.<\/p>\n<p class=\"MsoNormal\">&nbsp;<\/p>\n<p><b><span>Ed Wilson and Craig Liebendorfer, Scripting Guys<\/p>\n<p><\/span><\/b><\/p>\n<p>&nbsp;<span class=\"Apple-style-span\" style=\"font-family: 'Helvetica Neue', Arial, sans-serif;font-size: 11px\">qch9z2mu5s<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hey, Scripting Guy! We have a number of files that we need to access at work from time to time. To protect these files, we make them read-only. This works great from a file protection standpoint, but it is really annoying when I need to make updates to the file because about half the time [&hellip;]<\/p>\n","protected":false},"author":595,"featured_media":87096,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[38,3,12,45],"class_list":["post-52393","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-files","tag-scripting-guy","tag-storage","tag-windows-powershell"],"acf":[],"blog_post_summary":"<p>Hey, Scripting Guy! We have a number of files that we need to access at work from time to time. To protect these files, we make them read-only. This works great from a file protection standpoint, but it is really annoying when I need to make updates to the file because about half the time [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/52393","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\/595"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/comments?post=52393"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/52393\/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=52393"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=52393"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=52393"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}