{"id":52103,"date":"2009-11-03T00:01:00","date_gmt":"2009-11-03T00:01:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2009\/11\/03\/hey-scripting-guy-can-i-be-informed-when-a-portable-drive-is-added-by-my-computer\/"},"modified":"2009-11-03T00:01:00","modified_gmt":"2009-11-03T00:01:00","slug":"hey-scripting-guy-can-i-be-informed-when-a-portable-drive-is-added-by-my-computer","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/hey-scripting-guy-can-i-be-informed-when-a-portable-drive-is-added-by-my-computer\/","title":{"rendered":"Hey, Scripting Guy! Can I Be Informed When a Portable Drive Is Added by My Computer?"},"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\" src=\"http:\/\/s7.addthis.com\/static\/btn\/v2\/lg-share-en.gif\" width=\"125\" height=\"16\"><\/a><!-- AddThis Button END --><\/p>\n<p class=\"MsoNormal\">&nbsp;<\/p>\n<p class=\"Readeraidonly\"><font size=\"2\"><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\"><\/font><\/p>\n<p class=\"MsoNormal\">Hey, Scripting Guy! I would love to be able to write a Windows PowerShell script that will inform me when a portable drive is added to my computer. Do you have ideas you could suggest?<\/p>\n<p class=\"MsoNormal\">&#8212; RC<\/p>\n<p class=\"MsoNormal\"><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\">Hello RC, <\/p>\n<p class=\"MsoNormal\">Microsoft Scripting Guy Ed Wilson here. Well it has already been a rather interesting week. I bought a new computer and loaded Windows 7 over the weekend. My new computer is hot. I loaded it up with 8 GB of RAM, 4 processor cores, and a <a href=\"http:\/\/en.wikipedia.org\/wiki\/Solid-state_drive\"><font face=\"Segoe\">solid-state<\/font><\/a> boot drive for the operating system. I practically need to bolt it to the floor because the thing really flies. Of course, the Scripting Wife was unimpressed when I told her I needed to also purchase an <a href=\"http:\/\/en.wikipedia.org\/wiki\/ESATA#External_SATA\"><font face=\"Segoe\">ESATA<\/font><\/a> array (for all my scuba-diving pictures). So I had to bribe her with a new flat-panel monitor for her Windows 7 Ultimate computer downstairs. Each of my high-resolution pictures is around 10 MB in size, and on my old computer scrolling, through the pictures was frustrating as I had to wait several seconds for each picture to load. On my new computer, I can click through the pictures as fast as I wish with no appreciable lag time. It makes reliving some of my old dives much more pleasant. <\/p>\n<p class=\"MsoNormal\">As an example, the following picture is a green moray eel I found hiding on the shipwreck Sea Tiger off the coast of Honolulu, Hawaii, in the United States. That dive was in June 2008 with a maximum depth of 110 feet (33 meters). The visibility was over 100 feet (30 meters), and the water was 81 degrees Fahrenheit (27 degrees Celsius). I was over there teaching a Windows PowerShell class and decided to combine a bit of holiday while I was on the island. All in all it was a lovely dive&mdash;and I get to relive it because of my new Windows 7 computer. <\/p>\n<p class=\"Fig-Graphic\"><img decoding=\"async\" title=\"Image of green moray eel\" alt=\"Image of green moray eel\" src=\"http:\/\/img.microsoft.com\/library\/media\/1033\/technet\/images\/scriptcenter\/qanda\/hsg\/2009\/november\/hey1103\/hsg-11-3-09-01.jpg\" width=\"600\" height=\"450\"><br><\/p>\n<p class=\"MsoNormal\">RC, you want to be notified when an external drive (such as a USB drive) is attached to your computer. Using Windows PowerShell 2.0 (in the box on Windows 7 and Windows 2008 Server R2; <a href=\"http:\/\/bit.ly\/2vNaz6\"><font face=\"Segoe\">downloadable for other operating systems<\/font><\/a>), I wrote the MonitorDriveEvents.ps1 script. This event-driven script is shown here. <\/p>\n<p class=\"CodeBlockScreenedHead\"><strong>MonitorDriveEvents.ps1<\/strong><\/p>\n<p class=\"CodeBlockScreened\"><span><font face=\"Lucida Sans Typewriter\">#requires -version 2.0<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlockScreened\"><span><font face=\"Lucida Sans Typewriter\">Function Get-EventType($eventType)<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlockScreened\"><span><font face=\"Lucida Sans Typewriter\">{<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlockScreened\"><span><font face=\"Lucida Sans Typewriter\"><span>&nbsp;<\/span>switch ($eventType)<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlockScreened\"><span><font face=\"Lucida Sans Typewriter\"><span>&nbsp;<\/span>{<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlockScreened\"><span><font face=\"Lucida Sans Typewriter\"><span>&nbsp; <\/span>1 {&#8220;Configuration changed&#8221;}<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlockScreened\"><span><font face=\"Lucida Sans Typewriter\"><span>&nbsp; <\/span>2 {&#8220;Device arrival&#8221;}<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlockScreened\"><span><font face=\"Lucida Sans Typewriter\"><span>&nbsp; <\/span>3 {&#8220;Device removal&#8221;}<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlockScreened\"><span><font face=\"Lucida Sans Typewriter\"><span>&nbsp; <\/span>4 {&#8220;docking&#8221;}<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlockScreened\"><span><font face=\"Lucida Sans Typewriter\"><span>&nbsp;<\/span>} #end switch<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlockScreened\"><span><font face=\"Lucida Sans Typewriter\">} #end get-eventType function<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlockScreened\"><span><font face=\"Lucida Sans Typewriter\">&nbsp;<\/font><\/p>\n<p><\/span><\/p>\n<p class=\"CodeBlockScreened\"><span><font face=\"Lucida Sans Typewriter\">$MaxEvents = 5<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlockScreened\"><span><font face=\"Lucida Sans Typewriter\">$ErrorActionPreference = &#8220;stop&#8221;<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlockScreened\"><span><font face=\"Lucida Sans Typewriter\">Register-WmiEvent -Class win32_VolumeChangeEvent -SourceIdentifier volumeChange<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlockScreened\"><span><font face=\"Lucida Sans Typewriter\">&nbsp;<\/font><\/p>\n<p><\/span><\/p>\n<p class=\"CodeBlockScreened\"><span><font face=\"Lucida Sans Typewriter\">For($i = 1 ; $i -le $MaxEvents ; $i ++)<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlockScreened\"><span><font face=\"Lucida Sans Typewriter\">{<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlockScreened\"><span><font face=\"Lucida Sans Typewriter\"><span>&nbsp;<\/span>Try {<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlockScreened\"><span><font face=\"Lucida Sans Typewriter\"><span>&nbsp;<\/span>$newEvent = Get-Event -SourceIdentifier volumeChange<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlockScreened\"><span><font face=\"Lucida Sans Typewriter\"><span>&nbsp;<\/span>write-host &#8220;Drive: &#8221; $newEvent.SourceEventArgs.NewEvent.DriveName &#8220;changed on $env:COMPUTERNAME&#8221;<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlockScreened\"><span><font face=\"Lucida Sans Typewriter\"><span>&nbsp;<\/span>write-host &#8220;Drive event was &#8221; $(Get-EventType -eventType $newEvent.SourceEventArgs.NewEvent.EventType)<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlockScreened\"><span><font face=\"Lucida Sans Typewriter\"><span>&nbsp;<\/span>Remove-Event -SourceIdentifier volumeChange }<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlockScreened\"><span><font face=\"Lucida Sans Typewriter\"><span>&nbsp;<\/span>Catch [System.Management.Automation.RuntimeException]{&#8220;No events&#8221;}<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlockScreened\"><span><font face=\"Lucida Sans Typewriter\"><span>&nbsp;<\/span>Start-Sleep -Seconds 5<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlockScreened\"><span><font face=\"Lucida Sans Typewriter\">}<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"MsoNormal\">The MonitorDriveEvents.ps1 script begins by using the <b>#requires &ndash;version 2.0<\/b> tag. The <b>#requires<\/b> statement looks like it is a comment that would be ignored by Windows PowerShell. However, the <b>#requires<\/b> statement is a directive that tells Windows PowerShell that the script will run only on Windows PowerShell 2.0. If you attempt to run a script that includes the #<b>requires &ndash;version 2.0<\/b> directive on Windows PowerShell 1.0, the script will fail. The error message that is produced is seen here:<\/p>\n<p class=\"Fig-Graphic\"><img decoding=\"async\" title=\"Image of error message when using requires statement on Windows PowerShell 1.0\" alt=\"Image of error message when using requires statement on Windows PowerShell 1.0\" src=\"http:\/\/img.microsoft.com\/library\/media\/1033\/technet\/images\/scriptcenter\/qanda\/hsg\/2009\/november\/hey1103\/hsg-11-3-09-02.jpg\" width=\"600\" height=\"157\"><\/p>\n<p class=\"MsoNormal\"><br>The next thing that is done in the MonitorDriveEvents.ps1 script is to create the <b>Get-EventType<\/b> function. The <b>Get-EventType<\/b> function receives the <b>eventType<\/b> property when an event is generated. The <b>eventType<\/b> property is defined on the <b>Win32_VolumeChangeEvent<\/b> WMI class. This class is documented on <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/aa394516(VS.85).aspx\"><font face=\"Segoe\">MSDN<\/font><\/a> and has two properties that we are interested in using. The first property is the drive letter that is assigned to the newly arrived drive, and the second is the <b>eventType<\/b> property from the instance of the <b>Win32_VolumeChangedEvent<\/b> WMI class that is created when an event arrives. This property lets us know if the drive has been added to the system or removed from the system. Because the <b>eventType<\/b> property is a numeric coded value, we need to translate the number that is returned into a string that makes more sense to us when the script is run. The <b>switch<\/b> statement in Windows PowerShell is similar to the <b>Select-Case<\/b> statement from VBScript (although it is more powerful, and can do more than choose between different input values). You can also think of the <b>switch<\/b> statement as a series of <b>if<\/b> statements. &ldquo;If the value of the <b>$eventType<\/b> input variable is equal to 1, then output &lsquo;Configuration changed&rsquo;.&rdquo; The <b>Get-EventType<\/b> function is seen here:<\/p>\n<p class=\"CodeBlock\"><span><font face=\"Lucida Sans Typewriter\">Function Get-EventType($eventType)<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlock\"><span><font face=\"Lucida Sans Typewriter\">{<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlock\"><span><font face=\"Lucida Sans Typewriter\"><span>&nbsp;<\/span>switch ($eventType)<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlock\"><span><font face=\"Lucida Sans Typewriter\"><span>&nbsp;<\/span>{<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlock\"><span><font face=\"Lucida Sans Typewriter\"><span>&nbsp; <\/span>1 {&#8220;Configuration changed&#8221;}<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlock\"><span><font face=\"Lucida Sans Typewriter\"><span>&nbsp; <\/span>2 {&#8220;Device arrival&#8221;}<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlock\"><span><font face=\"Lucida Sans Typewriter\"><span>&nbsp; <\/span>3 {&#8220;Device removal&#8221;}<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlock\"><span><font face=\"Lucida Sans Typewriter\"><span>&nbsp; <\/span>4 {&#8220;docking&#8221;}<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlock\"><span><font face=\"Lucida Sans Typewriter\"><span>&nbsp;<\/span>} #end switch<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlock\"><span><font face=\"Lucida Sans Typewriter\">} #end get-eventType function<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"MsoNormal\">After the <b>Get-EventType<\/b> function has been created, you come to the entry point to the script. Two variables receive values. The first variable, <b>$MaxEvents<\/b>, is used to determine how many event cycles will be examined. The second variable, <b>$ErrorActionPreference<\/b>, is a system variable that governs the way the script will behave if an error is detected. By setting the <b>$ErrorActionPreference<\/b> to <b>stop<\/b>, errors will cause the script to stop. This <b>stop<\/b> condition will be handled later in the script. Here are the two lines of code that assign values to variables:<\/p>\n<p class=\"CodeBlock\"><span><font face=\"Lucida Sans Typewriter\">$MaxEvents = 5<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlock\"><span><font face=\"Lucida Sans Typewriter\">$ErrorActionPreference = &#8220;stop&#8221;<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"MsoNormal\">To create a registration for the WMI event, you use the <b>Register-WmiEvent<\/b> Windows PowerShell cmdlet. Because the <b>Win32_VolumeChangeEvent<\/b> WMI class is designed to raise events, no special constructions are required to use the class&mdash;you can use the WMI class directly with the cmdlet. The <b>SourceIdentifier<\/b> parameter is used to give a name to the event source that will be used later to retrieve WMI events. This line of code is shown here: <\/p>\n<p class=\"CodeBlock\"><span><font face=\"Lucida Sans Typewriter\">Register-WmiEvent -Class win32_VolumeChangeEvent -SourceIdentifier volumeChange<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"MsoNormal\">A <b>For<\/b> loop is used to check for events a certain number of times. The <b>$MaxEvents<\/b> variable controls how many loops will be made to check for new WMI events. This is shown here: <\/p>\n<p class=\"CodeBlock\"><span><font face=\"Lucida Sans Typewriter\">For($i = 1 ; $i -le $MaxEvents ; $i ++)<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlock\"><span><font face=\"Lucida Sans Typewriter\">{<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"MsoNormal\">A <b>Try&hellip;Catch<\/b> construction is used to check for new events and to remove events from the WMI event queue. If you use the <b>Get-Event<\/b> cmdlet and there are no events, an error is generated. To avoid this, the <b>Try&hellip;Catch<\/b> construction is used. This is new syntax for Windows PowerShell 2.0. The Windows PowerShell script will attempt to retrieve new events by using the <b>Get-Event<\/b> cmdlet. If an error is generated, it is trapped by the <b>Catch<\/b> statement. Because the <b>$ErrorActionPreference<\/b> was set to <b>stop<\/b>, any error that is generated inside the <b>Try<\/b> statement will be caught by the <b>Catch<\/b> statement. If no errors are generated, the new events that are in the WMI event queue, are stored in the <b>$newEvent<\/b> variable. The <b>Write-Host<\/b> cmdlet is used to display the drive name from the new event and the event type. The value of the <b>EventType<\/b> is translated by calling the <b>Get-EventType<\/b> function. After this has been done, the event is removed by using the <b>Remove-Event<\/b> cmdlet. This section of the script is shown here: <\/p>\n<p class=\"CodeBlock\"><span><font face=\"Lucida Sans Typewriter\">Try {<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlock\"><span><font face=\"Lucida Sans Typewriter\"><span>&nbsp;<\/span>$newEvent = Get-Event -SourceIdentifier volumeChange<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlock\"><span><font face=\"Lucida Sans Typewriter\"><span>&nbsp;<\/span>write-host &#8220;Drive: &#8221; $newEvent.SourceEventArgs.NewEvent.DriveName &#8220;changed on $env:COMPUTERNAME&#8221;<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlock\"><span><font face=\"Lucida Sans Typewriter\"><span>&nbsp;<\/span>write-host &#8220;Drive event was &#8221; $(Get-EventType -eventType $newEvent.SourceEventArgs.NewEvent.EventType)<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlock\"><span><font face=\"Lucida Sans Typewriter\"><span>&nbsp;<\/span>Remove-Event -SourceIdentifier volumeChange }<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"MsoNormal\">The <b>Catch<\/b> statement is used to catch any Windows PowerShell errors. If an error occurs when reading the event from the event queue, it means that no event has occurred. The phrase &ldquo;No events&rdquo; is displayed if an error is detected. The <b>Start-Sleep<\/b> cmdlet is used to pause the execution of the script for five seconds. This section of the script is shown here:<\/p>\n<p class=\"CodeBlock\"><span><font face=\"Lucida Sans Typewriter\">Catch [System.Management.Automation.RuntimeException]{&#8220;No events&#8221;}<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlock\"><span><font face=\"Lucida Sans Typewriter\"><span>&nbsp;<\/span>Start-Sleep -Seconds 5<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"CodeBlock\"><span><font face=\"Lucida Sans Typewriter\">}<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"MsoNormal\">When the script runs, the drive letter of newly added drives is displayed in the output pane of the Windows PowerShell ISE. If no new drive is detected, the phrase &ldquo;No events&rdquo; is displayed. The output from the Windows PowerShell ISE is seen here:<\/p>\n<p class=\"MsoNormal\"><img decoding=\"async\" title=\"Image of output from Windows PowerShell ISE\" alt=\"Image of output from Windows PowerShell ISE\" src=\"http:\/\/img.microsoft.com\/library\/media\/1033\/technet\/images\/scriptcenter\/qanda\/hsg\/2009\/november\/hey1103\/hsg-11-3-09-03.jpg\" width=\"600\" height=\"415\"><\/p>\n<p class=\"MsoNormal\"><br>Well, RC, that is about all there is to checking for a drive event. Keep in mind that the Windows PowerShell script needs to be running to detect if a drive has been inserted. In addition, because of the way the script is written, it will only display information for one event per polling cycle (the amount of time the script is sleeping). If you have multiple events that occur during the polling cycle, you would need to use either a <b>For<\/b> statement or a <b>ForEach<\/b> statement to iterate through the collection of events that are returned and display the drive information from the event. This script is not intended to be a security auditing script, but rather a convenience script you could easily modify to automatically transfer files from a folder to the portable drive in an automated fashion. Join us tomorrow as WMI Event Week continues. <\/p>\n<p class=\"MsoNormal\">If you want to know exactly what we will be looking at tomorrow, follow us on <a href=\"http:\/\/www.twitter.com\/scriptingguys\/\" target=\"_blank\"><font face=\"Segoe\">Twitter<\/font><\/a> or <a href=\"http:\/\/www.facebook.com\/home.php?#\/group.php?gid=5901799452\" target=\"_blank\"><font face=\"Segoe\">Facebook<\/font><\/a>. If you have any questions, send e-mail to us at <a href=\"http:\/\/blogs.technet.commailto:scripter@microsoft.com\" target=\"_blank\"><font face=\"Segoe\">scripter@microsoft.com<\/font><\/a> or post them on the <a href=\"http:\/\/social.technet.microsoft.com\/Forums\/en\/ITCG\/threads\/\" target=\"_blank\">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<\/span><\/b><\/p>\n<p><font size=\"3\" face=\"Times New Roman\">&nbsp;<\/font><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Hey, Scripting Guy! I would love to be able to write a Windows PowerShell script that will inform me when a portable drive is added to my computer. Do you have ideas you could suggest? &#8212; RC Hello RC, Microsoft Scripting Guy Ed Wilson here. Well it has already been a rather interesting week. [&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":[42,3,4,45,6],"class_list":["post-52103","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-events-and-monitoring","tag-scripting-guy","tag-scripting-techniques","tag-windows-powershell","tag-wmi"],"acf":[],"blog_post_summary":"<p>&nbsp; Hey, Scripting Guy! I would love to be able to write a Windows PowerShell script that will inform me when a portable drive is added to my computer. Do you have ideas you could suggest? &#8212; RC Hello RC, Microsoft Scripting Guy Ed Wilson here. Well it has already been a rather interesting week. [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/52103","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=52103"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/52103\/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=52103"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=52103"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=52103"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}