{"id":12151,"date":"2011-11-08T00:01:00","date_gmt":"2011-11-08T00:01:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2011\/11\/08\/use-powershell-to-pause-a-script-while-another-process-exits\/"},"modified":"2011-11-08T00:01:00","modified_gmt":"2011-11-08T00:01:00","slug":"use-powershell-to-pause-a-script-while-another-process-exits","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/use-powershell-to-pause-a-script-while-another-process-exits\/","title":{"rendered":"Use PowerShell to Pause a Script While Another Process Exits"},"content":{"rendered":"<p><span style=\"font-size: small\"><span style=\"font-family: Segoe\"><strong>Summary: <\/strong>Learn how to use Windows PowerShell to pause a script and wait for another process to exit before continuing.<\/span><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-family: Segoe\"><\/span><\/span><\/p>\n<\/p>\n<p><span style=\"font-family: Segoe;font-size: small\"><span style=\"font-family: Segoe;font-size: small\"><span style=\"font-family: Segoe;font-size: small\"><span style=\"font-family: Segoe;font-size: small\"><span style=\"font-size: small\"><span style=\"font-family: Segoe\"><span style=\"font-family: Segoe;font-size: small\"><span style=\"font-family: Segoe\"><img decoding=\"async\" title=\"Hey, Scripting Guy! Question\" border=\"0\" alt=\"Hey, Scripting Guy! Question\" align=\"left\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/q-for-powertip.jpg\" width=\"34\" height=\"34\" \/><\/span><\/span><\/span><\/span><\/span><\/span><\/span>Hey, Scripting Guy! I am attempting to use Windows PowerShell to shut down an application, but the application is rather complicated. I need to stop one process, and wait for that process to complete before starting the second process. I have attempted to use the <b>Start-Sleep<\/b> cmdlet to pause script execution to allow for the different processes to complete, but unfortunately different systems are faster than others so this is a hit-or-miss proposition. Can you figure out a better way of doing this?<\/span><\/p>\n<p><span style=\"font-family: Segoe;font-size: small\">&mdash;SK<\/span><\/p>\n<p><span style=\"font-family: Segoe;font-size: small\">&nbsp;<\/span><\/p>\n<p><span style=\"font-family: Segoe;font-size: small\"><span style=\"font-family: Segoe;font-size: small\"><span style=\"font-family: Segoe;font-size: small\"><span style=\"font-family: Segoe;font-size: small\"><span style=\"font-family: Segoe;font-size: small\"><span style=\"font-family: Segoe;font-size: small\"><span style=\"font-family: Segoe\"><img decoding=\"async\" title=\"Hey, Scripting Guy! Answer\" border=\"0\" alt=\"Hey, Scripting Guy! Answer\" align=\"left\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/a-for-powertip.jpg\" width=\"34\" height=\"34\" \/><\/span><\/span><\/span><\/span><\/span><\/span>Hello SK, <\/span><\/p>\n<p><span style=\"font-family: Segoe;font-size: small\">Microsoft Scripting Guy Ed Wilson here. Well, I am floating along at 35,000 feet (10,850 meters) listening to Stan Kenton&rsquo;s <i>Waltz of the Prophets, <\/i>which in my mind (as a former saxophone major at the university) is one of the absolutely best jazz standards ever written. I have been playing around with Windows PowerShell for the last several hours (decided to group a bunch of my utility functions into a Windows PowerShell module, create a manifest, and install them into my Windows PowerShell folder by using my <b>Copy-Modules<\/b> function). You should really be investing in writing Windows PowerShell modules instead of writing one-off scripts, if possible. The effort will pay great dividends. <\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-family: Segoe\">Anyway, I am sitting in First Class (I was upgraded) with a decent worktable, and my new laptop will get over eight hours and still provide decent performance, so life is good. The solitude provides a wonderful time for exploring and for playing with Windows PowerShell. I am forcing myself to stay away from WMI for now, and am instead focusing on different ways of putting together cmdlets, to see if I can come up with something cool. I was pretty pleased with the path trick I came up with in yesterday&rsquo;s <\/span><a href=\"http:\/\/blogs.technet.com\/b\/heyscriptingguy\/archive\/2011\/11\/07\/two-powerful-tricks-for-finding-powershell-scripts.aspx\"><span style=\"font-family: Segoe\">Two Powerful Tricks for Finding PowerShell Scripts<\/span><\/a><span style=\"font-family: Segoe\"> post.<\/span><\/span><\/p>\n<p><span style=\"font-family: Segoe;font-size: small\">One of the things I was playing around with is the <b>Wait-Process<\/b> cmdlet. It is most useful when used in a script in that it will halt execution of a script until a process terminates. This allows an easy way to write a script that terminates multiple processes&mdash;one at a time. <\/span><\/p>\n<p><span style=\"font-family: Segoe;font-size: small\">There are two ways that the <b>Wait-Process<\/b> cmdlet accepts input: either a process name or a process ID. For example, I can start an instance of Notepad and then use <b>Wait-Process<\/b> to pause until Notepad closes. <\/span><\/p>\n<p style=\"padding-left: 30px\"><span style=\"font-family: Segoe;font-size: small\">Notepad<\/span><\/p>\n<p style=\"padding-left: 30px\"><span style=\"font-family: Segoe;font-size: small\">Wait-Process notepad<\/span><\/p>\n<p><span style=\"font-family: Segoe;font-size: small\">When any instance of the Notepad process exits, control to the script (or Windows PowerShell console) returns. This works when you do not care which copy of Notepad closes, or when you know there is only a single instance of a process running. <\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-family: Segoe\">A more useful way to do this is to capture the process ID of the process when it launches, and use that specific process ID with the <b>Wait-Process<\/b> cmdlet. This technique uses the <\/span><a href=\"http:\/\/blogs.technet.com\/search\/searchresults.aspx?q=invoke-wmimethod&amp;sections=7618\"><span style=\"font-family: Segoe\">Invoke-WmiMethod<\/span><\/a><span style=\"font-family: Segoe\"> cmdlet and is shown here:<\/span><\/span><\/p>\n<p style=\"padding-left: 30px\"><span style=\"font-family: Segoe;font-size: small\">$proc = Invoke-WmiMethod -Class win32_process -Name create -ArgumentList &#8220;notepad&#8221;<\/span><\/p>\n<p style=\"padding-left: 30px\"><span style=\"font-family: Segoe;font-size: small\">Wait-Process -Id $proc.ProcessId<\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-family: Segoe\">One of my favorite tricks (but it is not in my <\/span><a href=\"http:\/\/blogs.technet.com\/b\/heyscriptingguy\/archive\/2011\/06\/18\/top-ten-favorite-powershell-tricks-part-1.aspx?CommentPosted=true#commentmessage\"><span style=\"font-family: Segoe\">top ten favorite Windows PowerShell tricks<\/span><\/a><span style=\"font-family: Segoe\">) pipes Notepad to <b>Out-Null<\/b> to halt processing the script until Notepad closes. I then remove the copy of the text file that was viewed. This is a great way to handle temporary files. This technique is shown in the following code:<\/span><\/span><\/p>\n<p style=\"padding-left: 30px\"><span style=\"font-family: Segoe;font-size: small\">$tmpfile = [io.path]::GetTempFileName()<\/span><\/p>\n<p style=\"padding-left: 30px\"><span style=\"font-family: Segoe;font-size: small\">get-process &gt;&gt; $tmpFile<\/span><\/p>\n<p style=\"padding-left: 30px\"><span style=\"font-family: Segoe;font-size: small\">notepad $tmpfile | out-null<\/span><\/p>\n<p style=\"padding-left: 30px\"><span style=\"font-family: Segoe;font-size: small\">Remove-Item $tmpfile<\/span><\/p>\n<p style=\"padding-left: 30px\"><span style=\"font-family: Segoe;font-size: small\">test-path $tmpfile<\/span><\/p>\n<p><span style=\"font-family: Segoe;font-size: small\">The problem with this &ldquo;trick&rdquo; is that it does not work for other things. For example, if I write process information in HTML format and display that in Internet Explorer, the <b>Out-Null<\/b> trick does not halt the script. In addition, if I attempt to close Internet Explorer without a specific process ID, I might close more than once instance of Internet Explorer. The code that follows creates a temporary file in a temporary location. It changes the file extension to HTML, and then uses the <b>Convertto-HTML<\/b> cmdlet to output HTML formatted data from the <b>Get-Process<\/b> cmdlet. I use the <b>Out-File<\/b> cmdlet to write my HTML formatted data to a file, and then I use the <b>Invoke-Item<\/b> cmdlet to open the HTML file in Internet Explorer (at least on my system; this methodology will open the HTML file with the default program associated with that extension):<\/span><\/p>\n<p style=\"padding-left: 30px\"><span style=\"font-family: Segoe;font-size: small\">$tmpfile = [io.path]::GetTempFileName() <\/span><\/p>\n<p style=\"padding-left: 30px\"><span style=\"font-family: Segoe;font-size: small\">$tmpFile = &#8220;{0}.{1}&#8221; -f ($tmpfile).split(&#8220;.&#8221;)[0],&#8221;html&#8221;<\/span><\/p>\n<p style=\"padding-left: 30px\"><span style=\"font-family: Segoe;font-size: small\">Get-process | ConvertTo-HTML | <\/span><\/p>\n<p style=\"padding-left: 30px\"><span style=\"font-family: Segoe;font-size: small\">Out-File -FilePath $tmpFile -Encoding ascii -append <\/span><\/p>\n<p style=\"padding-left: 30px\"><span style=\"font-family: Segoe;font-size: small\">invoke-item $tmpfile<\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-family: Segoe\"><b>Note<\/b>&nbsp;&nbsp; See the excellent guest Hey, Scripting Guy! Blog post, <\/span><a href=\"http:\/\/blogs.technet.comhttps:\/\/devblogs.microsoft.com\/scripting\/proxy-functions-spice-up-your-powershell-core-cmdlets\/\"><span style=\"font-family: Segoe\">Proxy Functions: Spice Up Your PowerShell Core Cmdlets<\/span><\/a><span style=\"font-family: Segoe\">, written by Microsoft PowerShell MVP Shay Levy for a way to add a <i>filepath <\/i>parameter to the <b>ConvertTo-HTML<\/b> cmdlet. By creating a proxy function, you can avoid a call to <b>Out-File<\/b>. <\/span><\/span><\/p>\n<p><span style=\"font-family: Segoe;font-size: small\">The <b>Out-Null<\/b> trick will not pause the script and allow for cleanup, and we would not know which version or instance of Internet Explorer might be killed anyway, so there needs to be a new way. Here are the steps involved:<\/span><\/p>\n<ol>\n<li><span style=\"font-size: small\"><span style=\"font-family: Segoe\">Create a temporary file name.<\/span><\/span><\/li>\n<li><span style=\"font-size: small\"><span style=\"font-family: Segoe\">Change the file extension to <i>html<\/i>.<\/span><\/span><\/li>\n<li><span style=\"font-size: small\"><span style=\"font-family: Segoe\">Pipe data to the <b>ConvertTo-Html<\/b> cmdlet.<\/span><\/span><\/li>\n<li><span style=\"font-size: small\"><span style=\"font-family: Segoe\">Pipe the data from <b>ConvertTo-Html<\/b> to <b>Out-File<\/b>, and create an HTML document.<\/span><\/span><\/li>\n<li><span style=\"font-size: small\"><span style=\"font-family: Segoe\">Use <b>Invoke-WMIMethod<\/b> to open the file and store the return values.<\/span><\/span><\/li>\n<li><span style=\"font-size: small\"><span style=\"font-family: Segoe\">Use the <b>Wait-Process<\/b> cmdlet to pause execution of the script and wait for the process to close.<\/span><\/span><\/li>\n<li><span style=\"font-size: small\"><span style=\"font-family: Segoe\">Use <b>Remove-Item<\/b> to remove the temporary file.<\/span><\/span><\/li>\n<\/ol>\n<p><span style=\"font-family: Segoe;font-size: small\">The GetProcessInfoDisplayHTMLtrackProcessAndRemoveTmpFile.ps1 script illustrates these steps.<\/span><\/p>\n<p style=\"padding-left: 30px\"><span style=\"font-size: small\"><b><span style=\"font-family: Segoe\">GetProcessInfoDisplayHTMLtrackProcessAndRemoveTmpFile.ps1<\/span><\/b><\/span><\/p>\n<p style=\"padding-left: 30px\"><span style=\"font-family: Segoe;font-size: small\">$tmpfile = [io.path]::GetTempFileName() <\/span><\/p>\n<p style=\"padding-left: 30px\"><span style=\"font-family: Segoe;font-size: small\">$tmpFile = &#8220;{0}.{1}&#8221; -f ($tmpfile).split(&#8220;.&#8221;)[0],&#8221;html&#8221;<\/span><\/p>\n<p style=\"padding-left: 30px\"><span style=\"font-family: Segoe;font-size: small\">$iepath = Join-Path -Path ${env:ProgramFiles(x86)} `<\/span><\/p>\n<p style=\"padding-left: 30px\"><span style=\"font-family: Segoe;font-size: small\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -ChildPath &#8220;internet explorer\\iexplore.exe&#8221;<\/span><\/p>\n<p style=\"padding-left: 30px\"><span style=\"font-family: Segoe;font-size: small\">Get-process | ConvertTo-HTML | <\/span><\/p>\n<p style=\"padding-left: 30px\"><span style=\"font-family: Segoe;font-size: small\">Out-File -FilePath $tmpFile -Encoding ascii -append <\/span><\/p>\n<p style=\"padding-left: 30px\"><span style=\"font-family: Segoe;font-size: small\">$iepid = Invoke-WmiMethod -Class win32_process -Name create -Argument &#8220;$iepath $tmpfile&#8221;<\/span><\/p>\n<p style=\"padding-left: 30px\"><span style=\"font-family: Segoe;font-size: small\">Wait-Process -Id $iepid.ProcessId<\/span><\/p>\n<p style=\"padding-left: 30px\"><span style=\"font-family: Segoe;font-size: small\">Remove-Item $tmpfile<\/span><\/p>\n<p><span style=\"font-family: Segoe;font-size: small\">In the script, the first thing I do is get a temporary file name. The <b>GetTempFileName<\/b> method creates a temporary file name in the temporary location. An example of such a file name is shown here:<\/span><\/p>\n<p style=\"padding-left: 30px\"><span style=\"font-family: Segoe;font-size: small\">C:\\Users\\edwilson\\AppData\\Local\\Temp\\tmp1573.tmp<\/span><\/p>\n<p><span style=\"font-family: Segoe;font-size: small\">I split the string at the period. This is not a reliable method for splitting file names and removing the file extension, but it does work here. For example, this will fail if a file name has two periods in the name. I have, on occasion concatenated the temporary file name with &ldquo;.html&rdquo; and ended up with a filename with two periods in it, which is, of course, a perfectly acceptable file name. Here I am simply exploring other ways of creating a temporary file name with an HTML file extension. Internet Explorer requires a file to have an HTML file extension, or it will not render the page properly. For example, if I stick with the .tmp file extension, the page renders as shown in the following figure.<\/span><\/p>\n<p><span style=\"font-family: Segoe;font-size: small\"><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/2100.hsg-11-8-11-01.png\"><img decoding=\"async\" style=\"border: 0px\" title=\"Image of how page renders with .tmp file extension\" alt=\"Image of how page renders with .tmp file extension\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/2100.hsg-11-8-11-01.png\" \/><\/a><\/span><\/p>\n<p><span style=\"font-family: Segoe;font-size: small\">I like to use the <b>Join-Path<\/b> cmdlet to build paths. To do this, I need to supply the <b>path<\/b> (parent path) portion and the <b>childpath<\/b> (child path) portion of the path. I am not restricted to simply <b>path\\executable<\/b><i> <\/i>in my formatting. I can, for example, include additional directories in my <b>childpath<\/b><i> <\/i>portion of the command. In this example, I use an environmental variable to retrieve the path to the x86 program files, and then I add the remainder of the path to the Internet Explorer executable. I broke the command, and used the backtick (`) character for line continuation. I would not normally do this, but it is needed to fit it on the page. This portion of the script follows:<\/span><\/p>\n<p style=\"padding-left: 30px\"><span style=\"font-family: Segoe;font-size: small\">$iepath = Join-Path -Path ${env:ProgramFiles(x86)} `<\/span><\/p>\n<p style=\"padding-left: 30px\"><span style=\"font-family: Segoe;font-size: small\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -ChildPath &#8220;internet explorer\\iexplore.exe&#8221;<\/span><\/p>\n<p><span style=\"font-family: Segoe;font-size: small\"><b>Note<\/b>&nbsp; &nbsp;When copying code from the Hey, Scripting Guy! Blog, it is possible that extraneous characters appear after the backtick character, and that invisible character will actually break the code. The fix is to paste the code in the Windows PowerShell ISE and use the backspace character to erase the invisible characters that follow the backtick character.<\/span><\/p>\n<p><span style=\"font-family: Segoe;font-size: small\">I now create a HTML page by using the <b>Convertto-HTML<\/b> cmdlet. I write the HTML code to a file by using the <b>Out-File<\/b> cmdlet. This code is shown here:<\/span><\/p>\n<p style=\"padding-left: 30px\"><span style=\"font-family: Segoe;font-size: small\">Get-process | ConvertTo-HTML | <\/span><\/p>\n<p style=\"padding-left: 30px\"><span style=\"font-family: Segoe;font-size: small\">Out-File -FilePath $tmpFile -Encoding ascii -append<\/span><\/p>\n<p><span style=\"font-family: Segoe;font-size: small\">I use the <b>Invoke-WMIMethod<\/b> cmdlet to call the <b>create<\/b><i> <\/i>method from the <b>Win32_Process<\/b> WMI class. I use this methodology because it returns the process ID of the newly created instance of Internet Explorer. I store the process ID in a variable called <b>$iepid<\/b>. This code is shown here:<\/span><\/p>\n<p style=\"padding-left: 30px\"><span style=\"font-family: Segoe;font-size: small\">$iepid = Invoke-WmiMethod -Class win32_process -Name create -Argument &#8220;$iepath $tmpfile&#8221;<\/span><\/p>\n<p><span style=\"font-family: Segoe;font-size: small\">I now halt execution of the script until the newly created instance of Internet Explorer goes away. After it goes away, I call the <b>Remove-Item<\/b> cmdlet, and I delete the temporary HTML file, as shown here: <\/span><\/p>\n<p style=\"padding-left: 30px\"><span style=\"font-family: Segoe;font-size: small\">Wait-Process -Id $iepid.ProcessId<\/span><\/p>\n<p style=\"padding-left: 30px\"><span style=\"font-family: Segoe;font-size: small\">Remove-Item $tmpfile<\/span><\/p>\n<p><span style=\"font-family: Segoe;font-size: small\">The HTML file that the script creates and displays is shown in the following figure.<\/span><\/p>\n<p><span style=\"font-family: Segoe;font-size: small\"><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/1537.HSG-11-8-11-02.png\"><img decoding=\"async\" style=\"border: 0px\" title=\"Image of HTML file the script creates and displays\" alt=\"Image of HTML file the script creates and displays\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/1537.HSG-11-8-11-02.png\" \/><\/a><\/span><\/p>\n<p><span style=\"font-family: Segoe;font-size: small\">&nbsp;<\/span><\/p>\n<p><span style=\"font-family: Segoe;font-size: small\">SK that is all there is to using the <b>Wait-Process<\/b> cmdlet to pause script execution and wait for a process to end. I invite you to join me tomorrow for more cool Windows PowerShell stuff. <\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-family: Segoe\">I invite you to follow me on <\/span><a href=\"http:\/\/bit.ly\/scriptingguystwitter\" target=\"_blank\"><span style=\"font-family: Segoe\">Twitter<\/span><\/a><span style=\"font-family: Segoe\"> and <\/span><a href=\"http:\/\/bit.ly\/scriptingguysfacebook\"><span style=\"font-family: Segoe\">Facebook<\/span><\/a><span style=\"font-family: Segoe\">. If you have any questions, send email to me at <\/span><a href=\"mailto:scripter@microsoft.com\" target=\"_blank\"><span style=\"font-family: Segoe\">scripter@microsoft.com<\/span><\/a><span style=\"font-family: Segoe\">, or post your questions on the <\/span><a href=\"http:\/\/bit.ly\/scriptingforum\" target=\"_blank\"><span style=\"font-family: Segoe\">Official Scripting Guys Forum<\/span><\/a><span style=\"font-family: Segoe\">. See you tomorrow. Until then, peace.<\/span><\/span><\/p>\n<\/p>\n<p><span style=\"font-size: small\"><b>Ed Wilson, Microsoft Scripting Guy<\/b><\/span><\/p>\n<p><span style=\"font-family: Segoe;font-size: small\"><\/span>&nbsp;<\/p>\n<p><span style=\"font-family: Segoe;font-size: small\">&nbsp;<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary: Learn how to use Windows PowerShell to pause a script and wait for another process to exit before continuing. Hey, Scripting Guy! I am attempting to use Windows PowerShell to shut down an application, but the application is rather complicated. I need to stop one process, and wait for that process to complete before [&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":[25,3,4,45,77],"class_list":["post-12151","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-displaying-output","tag-scripting-guy","tag-scripting-techniques","tag-windows-powershell","tag-writing"],"acf":[],"blog_post_summary":"<p>Summary: Learn how to use Windows PowerShell to pause a script and wait for another process to exit before continuing. Hey, Scripting Guy! I am attempting to use Windows PowerShell to shut down an application, but the application is rather complicated. I need to stop one process, and wait for that process to complete before [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/12151","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=12151"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/12151\/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=12151"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=12151"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=12151"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}