{"id":52843,"date":"2009-07-29T03:01:00","date_gmt":"2009-07-29T03:01:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2009\/07\/29\/hey-scripting-guy-how-can-i-add-a-user-to-multiple-groups\/"},"modified":"2009-07-29T03:01:00","modified_gmt":"2009-07-29T03:01:00","slug":"hey-scripting-guy-how-can-i-add-a-user-to-multiple-groups","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/hey-scripting-guy-how-can-i-add-a-user-to-multiple-groups\/","title":{"rendered":"Hey, Scripting Guy! How Can I Add a User to Multiple Groups?"},"content":{"rendered":"<p class=\"MsoNormal\"><span><\/span><\/p>\n<p class=\"MsoNormal\"><span lang=\"EN\"><img decoding=\"async\" class=\"nearGraphic\" 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><\/p>\n<p class=\"MsoNormal\">Hey Scripting Guy! It seems that I can never find what I need anymore. I am looking for a Windows PowerShell script that will add a user to multiple groups. The user and the group are in the same organizational unit, and I do not want to have to run the same script multiple times to add a user to multiple groups. It should be easy to do, right?<\/p>\n<\/p>\n<p class=\"MsoNormal\">&#8212; WK<\/p>\n<p class=\"MsoNormal\">\n<p>&nbsp;<\/p>\n<p class=\"MsoNormal\">\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<\/p>\n<p class=\"MsoNormal\"><img decoding=\"async\" class=\"nearGraphic\" 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\"><\/p>\n<p class=\"MsoNormal\">Hello WK, <\/p>\n<p class=\"MsoNormal\">I am sorry you are having trouble finding information. You did not mention if it is the Internet in general, or the Script Center Web site that is causing you trouble. If it is the Internet in general, I would suggest you give <a href=\"http:\/\/www.bing.com\/\"><font face=\"Segoe\">Bing<\/font><\/a> a try&mdash;I have been using it since its inception and have been impressed with both its speed and the results it returns. In fact, I like it so much; I have it installed on my Windows Mobile Smart phone as well. Bing rocks and was a lifesaver when I was on vacation in New York City recently. If you are having problems navigating the Scripting Guys site, I would suggest you watch <a href=\"http:\/\/technet.microsoft.com\/en-us\/scriptcenter\/ee236297.aspx\"><font face=\"Segoe\">Script Center 101<\/font><\/a>. We have recently added a really cool control to the main Script Center page that hosts this entertaining and informative video. After watching Script Center 101, you will know as much about the Script Center as I do. <\/p>\n<p class=\"MsoNormal\">In the meantime, I do not want you to miss out on finding a script, so I wrote the Add-UserToGroups.ps1 script for you. Check it out. it is cool. The complete script is seen here. <\/p>\n<p class=\"CodeBlockScreenedHead\"><strong>Add-UserToGroups.ps1<\/p>\n<p><\/strong><\/p>\n<p class=\"CodeBlockScreened\"><font size=\"1\"><font><font face=\"Lucida Sans Typewriter\">Param(<br><span>&nbsp;&nbsp; <\/span>[string[]]$group,<br><span>&nbsp;&nbsp; <\/span>[string]$user,<br><span>&nbsp;&nbsp; <\/span>[string]$ou,<br><span>&nbsp;&nbsp; <\/span>[string]$domain,<br><span>&nbsp;&nbsp; <\/span>[switch]$whatif,<br><span>&nbsp;&nbsp; <\/span>[switch]$help,<br><span>&nbsp;&nbsp; <\/span>[switch]$debug<br>) #end param<\/p>\n<p>Function Get-ScriptHelp<br>{<br><span>&nbsp;<\/span>&#8220;Add-UserToGroups.ps1 adds a user to one or more groups. User and group must be in same OU&#8221;<br><span>&nbsp;<\/span>&#8220;Add-UserToGroups.ps1 -user cn=myuser -group cn=mygroup -ou ou=myou -domain &#8216;dc=nwtraders,dc=com'&#8221;<br><span>&nbsp; <\/span>&#8220;Add-UserToGroups.ps1 -user cn=myuser -group cn=mygroup1,cn=mygroup2 -ou ou=myou -domain &#8216;dc=nwtraders,dc=com'&#8221;<br><span>&nbsp;<\/span>&#8220;Add-UserToGroups.ps1 -user cn=myuser -group cn=mygroup -ou ou=myou -domain &#8216;dc=nwtraders,dc=com&#8217; -whatif&#8221;<br>} # end function Get-ScriptHelp<\/p>\n<p>Function Add-UserToGroups<br>{<br><span>&nbsp;<\/span>Param(<br><span>&nbsp;&nbsp; <\/span>[string[]]$group,<br><span>&nbsp;&nbsp; <\/span>[string]$user,<br><span>&nbsp;&nbsp; <\/span>[string]$ou,<br><span>&nbsp;&nbsp; <\/span>[string]$domain<br><span>&nbsp;<\/span>) #end param<br><span>&nbsp;<\/span>$ads_Property_Append = 3<br><span>&nbsp;<\/span>ForEach($g in $group)<br><span>&nbsp;<\/span>{<br><span>&nbsp;&nbsp; <\/span>write-debug &#8220;Connecting to group: LDAP:\/\/$g,$ou,$domain&#8221; <br><span>&nbsp;&nbsp; <\/span>$de = [adsi]&#8221;LDAP:\/\/$g,$ou,$domain&#8221;<br><span>&nbsp;&nbsp;&nbsp; <\/span>write-debug &#8220;Putting user: $user,$ou,$domain&#8221;<br><span>&nbsp;&nbsp; <\/span>$de.putex($ads_Property_Append,&#8221;member&#8221;, @(&#8220;$user,$ou,$domain&#8221;))<br><span>&nbsp;&nbsp; <\/span>$de.SetInfo()<br><span>&nbsp; <\/span>} #end foreach<br>} # end function Add-UserToGroups<\/p>\n<p>Function Get-Whatif<br>{<br><span>&nbsp; <\/span>Param(<br><span>&nbsp;&nbsp; <\/span>[string[]]$group,<br><span>&nbsp;&nbsp; <\/span>[string]$user,<br><span>&nbsp;&nbsp; <\/span>[string]$ou,<br><span>&nbsp;&nbsp; <\/span>[string]$domain<br><span>&nbsp;<\/span>) #end param<br><span>&nbsp;<\/span>ForEach($g in $group)<br><span>&nbsp; <\/span>{<br><span>&nbsp;&nbsp; <\/span>&#8220;WHATIF: Add user $user,$ou,$domain to $g,$ou,$domain&#8221; <br><span>&nbsp; <\/span>} #end foreach<br>} #end function Get-Whatif<\/p>\n<p># *** Entry Point to script ***<br>if($debug) { $debugPreference = &#8220;continue&#8221; }<br>if(-not($user -and $group -and $ou -and $domain)) <br><span>&nbsp; <\/span>{ throw (&#8220;user group ou and domain required&#8221;) }<br>if($whatif) { Get-Whatif -user $user -group $group -ou $ou -domain $domain ; exit }<br>if($help) { Get-Scripthelp ; exit }<\/p>\n<p><span>&nbsp;<\/span>Write-Debug &#8220;Adding user to group &#8230;&#8221;<br><span>&nbsp;<\/span>Write-Debug &#8220;Calling Add-UserToGroups function.&#8221;<br><span>&nbsp;<\/span>Write-Debug &#8220;passing: user $user group $group ou $ou domain $domain&#8221;<\/p>\n<p>Add-UserToGroups -user $user -group $group -ou $ou -domain $domain<\/p>\n<p><\/font><\/font><\/font><\/p>\n<p class=\"MsoNormal\">The first thing the Add-UserToGroups.ps1 script does is create a series of command-line parameters. To create command-line parameters, use the <b>Param<\/b> statement and separate each parameter with a comma. The group parameter is a string that will accept an array. The square brackets are used to indicate an array of strings. This allows you to supply the name of more than one group from the command line. The group parameter is seen here: <\/p>\n<p class=\"CodeBlock\"><font size=\"1\"><font face=\"Lucida Sans Typewriter\"><span>[string[]]$group<\/span><\/p>\n<p><\/font><\/font><\/p>\n<p class=\"MsoNormal\">The <b>user<\/b>, <b>ou<\/b>, and <b>domain<\/b> parameters are strings. When supplying the user name and the ou name from the command line, quotation marks are not required because the parameter expects a string to be supplied. The domain parameter value must be surrounded with single quotation marks. This is because the domain parts are separated by commas and would be interpreted as an array if they were not grouped by single quotation marks. The <b>user<\/b>, <b>ou<\/b>, and <b>domain<\/b> parameters are seen here: <\/p>\n<p class=\"CodeBlock\"><font size=\"1\"><font face=\"Lucida Sans Typewriter\"><span>[string]$user,<br>[string]$ou,<br>[string]$domain,<\/span><\/p>\n<p><\/font><\/font><\/p>\n<p class=\"MsoNormal\">The last three parameters are switched parameters. This means they only work if they are present on the command line. Switched parameters provide an easy way to incorporate additional functionality into the scripts design. Here three switched parameters are defined: <b>whatif<\/b>, <b>help<\/b>, and <b>debug<\/b>. These three parameters correspond to the common parameters that are supported by most cmdlets. In this manner, the Add-UserToGroups.ps1 script will behave in a similar fashion as Windows PowerShell cmdlets and will therefore be easy to use. The switched parameters are shown here: <\/p>\n<p class=\"CodeBlock\"><span><font size=\"1\" face=\"Lucida Sans Typewriter\">&nbsp;&nbsp; <\/font><\/span><font size=\"1\"><font face=\"Lucida Sans Typewriter\"><span>[switch]$whatif,<br><span>&nbsp;&nbsp; <\/span>[switch]$help,<br><span>&nbsp;&nbsp; <\/span>[switch]$debug<\/span><\/p>\n<p><\/font><\/font><\/p>\n<p class=\"MsoNormal\">The complete <b>Param<\/b> section of the script is seen here: <\/p>\n<p class=\"CodeBlock\"><font size=\"1\"><font face=\"Lucida Sans Typewriter\"><span>Param(<br><span>&nbsp;&nbsp; <\/span>[string[]]$group,<br><span>&nbsp;&nbsp; <\/span>[string]$user,<br><span>&nbsp;&nbsp; <\/span>[string]$ou,<br><span>&nbsp;&nbsp; <\/span>[string]$domain,<br><span>&nbsp;&nbsp; <\/span>[switch]$whatif,<br><span>&nbsp;&nbsp; <\/span>[switch]$help,<br><span>&nbsp;&nbsp; <\/span>[switch]$debug<br>) #end param<\/span><\/p>\n<p><\/font><\/font><\/p>\n<p class=\"MsoNormal\">When a script accepts command-line parameters, it is a best practice to provide help for the script. In Windows PowerShell 1.0, you can do this by creating a function that displays information about the parameters and acceptable syntax. In Windows PowerShell 2.0, there are tags that allow you to integrate the information with the <b>Get-Help<\/b> cmdlet. In the Add-UserToGroups.ps1 script, a function named <b>Get-ScriptHelp<\/b> is created to display the purpose of the script and several examples of allowable syntax. This ensures the script will run on both Windows PowerShell 2.0 and Windows PowerShell 1.0. The <b>Get-ScriptHelp<\/b> function is called when the script is called with the help switch. The entire <b>Get-ScriptHelp<\/b> function is seen here: <\/p>\n<p class=\"CodeBlock\"><font size=\"1\"><font face=\"Lucida Sans Typewriter\"><span>Function Get-ScriptHelp<br>{<br><span>&nbsp;<\/span>&#8220;Add-UserToGroups.ps1 adds a user to one or more groups. User and group must be in same OU&#8221;<br><span>&nbsp;<\/span>&#8220;Add-UserToGroups.ps1 -user cn=myuser -group cn=mygroup -ou ou=myou <br>-domain &#8216;dc=nwtraders,dc=com'&#8221;<br><span>&nbsp;<\/span>&#8220;Add-UserToGroups.ps1 -user cn=myuser -group cn=mygroup1,cn=mygroup2 -ou ou=myou <br>-domain &#8216;dc=nwtraders,dc=com'&#8221;<br><span>&nbsp;<\/span>&#8220;Add-UserToGroups.ps1 -user cn=myuser -group cn=mygroup -ou ou=myou <br>-domain &#8216;dc=nwtraders,dc=com&#8217; -whatif&#8221;<br>} # end function Get-ScriptHelp<\/span><\/p>\n<p><\/font><\/font><\/p>\n<p class=\"MsoNormal\">The main portion of the script is the <b>Add-UserToGroups<\/b> function. This function begins by creating a series of parameters for the function. These parameters correspond to the parameters created by the script itself. The difference is there are no switched parameters for the function. The <b>group<\/b> parameter is created as an array of strings just like it was at the beginning of the script. Similarly, the <b>user<\/b>, <b>ou<\/b>, and <b>domain<\/b> parameters are defined as strings. This is seen here: <\/p>\n<p class=\"CodeBlock\"><font size=\"1\"><font face=\"Lucida Sans Typewriter\"><span>Function Add-UserToGroups<br>{<br><span>&nbsp;<\/span>Param(<br><span>&nbsp;&nbsp; <\/span>[string[]]$group,<br><span>&nbsp;&nbsp; <\/span>[string]$user,<br><span>&nbsp;&nbsp; <\/span>[string]$ou,<br><span>&nbsp;&nbsp; <\/span>[string]$domain<br><span>&nbsp;<\/span>) #end param<\/span><\/p>\n<p><\/font><\/font><\/p>\n<p class=\"MsoNormal\">To update a property in Active Directory, you can use the <b>putex<\/b> method. This method needs a value from the <span><a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/aa772282(VS.85).aspx\">ADS_PROPERTY_OPERATION_ENUM<\/a>. The <b>ADS<\/b><\/span><b>_PROPERTY_APPEND<\/b> constant is equal to the value 3. When this is set to 3, it instructs the directory service to append the property values to the object.<\/p>\n<p class=\"MsoNormal\">The <b>ADS_PROPERTY_OPERATION_ENUM<\/b> values seen in Table 1 are used in the first position of the <b>putex<\/b> method call. <\/p>\n<p class=\"TableNum-Title\"><strong>Table 1<\/strong><\/p>\n<p class=\"TableNum-Title\"><strong>  <\/p>\n<table class=\"MsoNormalTable\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"328\">\n<div>\n<p class=\"TableHead\"><strong>Enumeration name<\/p>\n<p><\/strong><\/p>\n<\/div>\n<\/td>\n<td valign=\"top\" width=\"272\">\n<div>\n<p class=\"TableHead\"><strong>Enumeration value<\/p>\n<p><\/strong><\/p>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"328\">\n<div>\n<p class=\"TableText\"><span>&nbsp; <\/span>ADS_PROPERTY_CLEAR<span>&nbsp;&nbsp;&nbsp; <\/span><\/p>\n<\/div>\n<\/td>\n<td valign=\"top\" width=\"272\">\n<div>\n<p class=\"TableText\"><span>&nbsp;<\/span>1<\/p>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"328\">\n<div>\n<p class=\"TableText\"><span>&nbsp; <\/span>ADS_PROPERTY_UPDATE<span>&nbsp;&nbsp; <\/span><\/p>\n<\/div>\n<\/td>\n<td valign=\"top\" width=\"272\">\n<div>\n<p class=\"TableText\"><span>&nbsp;<\/span>2<\/p>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p><\/strong><\/p>\n<p class=\"MsoNormal\">Rather than create an actual constant, you can create a variable and assign the value to it. As long as you do not modify the value of the variable, it will be constant. If you feel the need to protect the value, you could make it a read-only variable. To do this, you would use the following syntax:<\/p>\n<p class=\"CodeBlock\"><font size=\"1\"><font face=\"Lucida Sans Typewriter\"><span>New-Variable -Name ads_Property_Append -Value 3 -Option readonly<\/span><\/p>\n<p><\/font><\/font><\/p>\n<p class=\"MsoNormal\">The advantage of a read-only variable is you can delete it or change the value if you specify the force switched parameter. You therefore obtain protection from inadvertent changes to the variable with the flexibility of making changes if you must do so. <\/p>\n<p class=\"MsoNormal\">In the <b>Add-UserToGroups<\/b> function there was no need to protect the variable, and a simple value assignment is used to create and to set the value for the variable. This is seen here: <\/p>\n<p class=\"CodeBlock\"><font size=\"1\"><font face=\"Lucida Sans Typewriter\"><span>&nbsp;<\/span><span>$ads_Property_Append = 3<\/span><\/p>\n<p><\/font><\/font><\/p>\n<p class=\"MsoNormal\">Because there may be more than one group that you wish to assign the user to, the <b>ForEach<\/b> statement is used to iterate through the <b>$group<\/b> variable. The variable <b>$g<\/b> is used to keep track of the position inside the collection. In Windows PowerShell this works if there is a single value in the <b>$group<\/b> variable or if there are many values. In VBScript, an error is generated when you try to walk through a collection by using <b>For&hellip;Each&hellip;Next<\/b> and there is a single value in the variable. This line of code is seen here: <\/p>\n<p class=\"CodeBlock\"><span><font size=\"1\" face=\"Lucida Sans Typewriter\">&nbsp;<\/font><\/span><font size=\"1\"><font face=\"Lucida Sans Typewriter\"><span>ForEach($g in $group)<br><span>&nbsp;<\/span>{<\/span><\/p>\n<p><\/font><\/font><\/p>\n<p class=\"MsoNormal\">You can use the <b>Write-Debug<\/b> cmdlet to display debugging information when the script is run with the debug switch. If the script is not run with the debug switch, nothing is displayed on the command line. This is seen here:<\/p>\n<p class=\"MsoNormal\"><img decoding=\"async\" title=\"Image of nothing displayed on the command line when script is run without debug switch\" alt=\"Image of nothing displayed on the command line when script is run without debug switch\" src=\"http:\/\/img.microsoft.com\/library\/media\/1033\/technet\/images\/scriptcenter\/qanda\/hsg\/2009\/july\/hey0729\/hsg-07-29-09-01.jpg\" width=\"600\" height=\"190\"><\/p>\n<p class=\"MsoNormal\"><br>A well-designed series of <b>Write-Debug<\/b> statements displays progress information on the Windows PowerShell console. The code that writes to the console is seen here: <\/p>\n<p class=\"CodeBlock\"><font size=\"1\"><font face=\"Lucida Sans Typewriter\"><span>&nbsp;&nbsp; <\/span><span>write-debug &#8220;Connecting to group: LDAP:\/\/$g,$ou,$domain&#8221;<\/span> <\/p>\n<p><\/font><\/font><\/p>\n<p class=\"MsoNormal\">Next the <span>[adsi]<\/span> type accelerator is used to connect to the group. The LDAP protocol is used to make the connection to the group in Active Directory. The returned <b>DirectoryEntry<\/b> object is stored in the variable <b>$de<\/b> as seen here: <\/p>\n<p class=\"CodeBlock\"><font size=\"1\"><font face=\"Lucida Sans Typewriter\"><span>&nbsp;&nbsp; <\/span><span>$de = [adsi]&#8221;LDAP:\/\/$g,$ou,$domain&#8221;<\/span><\/p>\n<p><\/font><\/font><\/p>\n<p class=\"MsoNormal\">Now it is time to produce another <b>Write-Debug<\/b> statement. This is seen here: <\/p>\n<p class=\"CodeBlock\"><font size=\"1\"><font face=\"Lucida Sans Typewriter\"><span>&nbsp;&nbsp;&nbsp; <\/span><span>write-debug &#8220;Putting user: $user,$ou,$domain&#8221;<\/span><\/p>\n<p><\/font><\/font><\/p>\n<p class=\"MsoNormal\">When the <b>DirectoryEntry<\/b> object has been created and stored in the <b>$de<\/b> variable, you can call the <b>putex<\/b> method to append the user to the <b>member<\/b> property of the <b>group<\/b> object. This is seen here: <\/p>\n<p class=\"CodeBlock\"><font size=\"1\"><font face=\"Lucida Sans Typewriter\"><span>&nbsp;&nbsp; <\/span><span>$de.putex($ads_Property_Append,&#8221;member&#8221;, @(&#8220;$user,$ou,$domain&#8221;))<\/span><\/p>\n<p><\/font><\/font><\/p>\n<p class=\"MsoNormal\">Next you will need to commit your changes to Active Directory. To do this, you call the <b>setinfo<\/b> method from the <b>DirectoryEntry<\/b> object. This is seen here: <\/p>\n<p class=\"CodeBlock\"><span><font size=\"1\" face=\"Lucida Sans Typewriter\">&nbsp;&nbsp; <\/font><\/span><font size=\"1\"><font face=\"Lucida Sans Typewriter\"><span>$de.SetInfo()<br><span>&nbsp; <\/span>} #end foreach<br>} # end function Add-UserToGroups<\/span><\/p>\n<p><\/font><\/font><\/p>\n<p class=\"MsoNormal\">It is time to create the <b>Get-Whatif<\/b> function. The <b>Get-Whatif<\/b> function is called when the script is run with the <b>whatif<\/b> switched parameter. The first thing that must be done is to create the same parameters that are used by the <b>Add-UserToGroups<\/b> function. This is because the <b>Get-Whatif<\/b> will accept the command-line parameters that would be used to add a user to one or more groups. This is seen here: <\/p>\n<p class=\"CodeBlock\"><font size=\"1\"><font face=\"Lucida Sans Typewriter\"><span>Function Get-Whatif<br>{<br><span>&nbsp; <\/span>Param(<br><span>&nbsp;&nbsp; <\/span>[string[]]$group,<br><span>&nbsp;&nbsp; <\/span>[string]$user,<br><span>&nbsp;&nbsp; <\/span>[string]$ou,<br><span>&nbsp;&nbsp; <\/span>[string]$domain<br><span>&nbsp;<\/span>) #end param<\/span><\/p>\n<p><\/font><\/font><\/p>\n<p class=\"MsoNormal\">Because there could be more than one group that is supplied from the command line, you will need to use the <b>ForEach<\/b> statement to walk through the group names. Inside the <b>ForEach<\/b> statement you display the <b>WhatIf<\/b> information. This is seen here: <\/p>\n<p class=\"CodeBlock\"><span><font size=\"1\" face=\"\"><\/font><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hey Scripting Guy! It seems that I can never find what I need anymore. I am looking for a Windows PowerShell script that will add a user to multiple groups. The user and the group are in the same organizational unit, and I do not want to have to run the same script multiple times [&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":[7,44,3,198,45],"class_list":["post-52843","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-active-directory","tag-groups","tag-scripting-guy","tag-users","tag-windows-powershell"],"acf":[],"blog_post_summary":"<p>Hey Scripting Guy! It seems that I can never find what I need anymore. I am looking for a Windows PowerShell script that will add a user to multiple groups. The user and the group are in the same organizational unit, and I do not want to have to run the same script multiple times [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/52843","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=52843"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/52843\/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=52843"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=52843"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=52843"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}