{"id":1541,"date":"2014-04-24T00:01:00","date_gmt":"2014-04-24T00:01:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2014\/04\/24\/create-and-manage-sharepoint-online-sites-by-using-powershell\/"},"modified":"2014-04-24T00:01:00","modified_gmt":"2014-04-24T00:01:00","slug":"create-and-manage-sharepoint-online-sites-by-using-powershell","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/create-and-manage-sharepoint-online-sites-by-using-powershell\/","title":{"rendered":"Create and Manage SharePoint Online Sites by Using PowerShell"},"content":{"rendered":"<p><b>Summary<\/b>: Guest blogger, Corey Roth, talks about using Windows PowerShell to create and manage SharePoint online sites.<\/p>\n<p>Microsoft Scripting Guy, Ed Wilson, is here. Today we have a guest post by SharePoint MVP, Corey Roth. Corey will be presenting at TechEd&nbsp;2014 this year in Houston, and he has taken the time to share his thoughts with us today. Here is a little bit about Corey:<\/p>\n<p style=\"margin-left:30px\">Corey Roth is an independent SharePoint consultant specializing in solutions in the Oil and Gas industry. Corey is a four-time recipient of the Microsoft MVP award in SharePoint Server. He has always focused on rapid adoption of new Microsoft technologies, including SharePoint 2013, Office 365, and Visual Studio 2013. When it comes to SharePoint, he specializes in ECM, Enterprise Search, and Apps. As an active member of the SharePoint community, he often speaks at conferences, events, and user groups. In his blog, <a href=\"http:\/\/www.dotnetmafia.com\/\" target=\"_blank\">Dot Net Mafia<\/a>, he posts about the latest technology and SharePoint. Corey is a member on the board for the Houston SharePoint Users Group. He has also recently founded an App development company called <a href=\"http:\/\/www.sp2apps.com\/\" target=\"_blank\">SP2<\/a>, specializing in apps for SharePoint 2013.&nbsp;<\/p>\n<p><b>&nbsp; &nbsp; &nbsp;Note &nbsp;<\/b>All scripts from today&#039;s post are available in the Script Center Repository:<\/p>\n<ul>\n<li><a href=\"http:\/\/gallery.technet.microsoft.com\/scriptcenter\/SharePoint-Online-Get-a-19cfb449\" target=\"_blank\">Get a list of sites in a site collection using PowerShell<\/a><\/li>\n<li><a href=\"http:\/\/gallery.technet.microsoft.com\/scriptcenter\/SharePoint-Online-Delete-a-e0aabe36\" target=\"_blank\">Delete a site using PowerShell and CSOM<\/a><\/li>\n<li><a href=\"http:\/\/gallery.technet.microsoft.com\/scriptcenter\/SharePoint-Online-Create-a-90cf1880\" target=\"_blank\">Create a new site using PowerShell and CSOM<\/a><\/li>\n<\/ul>\n<p>The <a href=\"http:\/\/bit.ly\/1hHX5qR\" target=\"_blank\">SharePoint Online Management Shell<\/a> has been out for a while now, allowing you to script some tasks with your Office 365 deployment. It lets you use Windows PowerShell to create site collections, work with users and groups, and upgrade site collections in SharePoint Online. However, if you are used to working with Windows PowerShell for SharePoint 2013 on-premises, you will notice that a number of common tasks are missing such as creating sites or enabling features.<\/p>\n<p>Luckily, we can make use of the Client Script Object Model (CSOM) in Windows PowerShell to accomplish some of these tasks. Today, we&#039;re going to look at creating sites, deleting sites, and getting a list of sites in SharePoint Online. It takes a few more lines of script, but this post will get you started.<\/p>\n<h2>Getting started<\/h2>\n<p>To work with CSOM in SharePoint Online, we need access to the client assemblies. You can either download the <a href=\"http:\/\/www.microsoft.com\/en-ie\/download\/details.aspx?id=35585\" target=\"_blank\">SharePoint Server 2013 Client Components SDK<\/a>, or you can get the assemblies from a local SharePoint 2013 installation. You don&#039;t need to run your Windows PowerShell script on a SharePoint server. It will work from Windows&nbsp;7 with SP1 or later.<\/p>\n<p>After you have located the assemblies, we need to load them in our script. We can do this a number of ways. If you are working directly on your SharePoint server, you can use <b>LoadWithPartialName<\/b>:<\/p>\n<p style=\"margin-left:30px\">[System.Reflection.Assembly]::LoadWithPartialName(&quot;Microsoft.SharePoint.Client&quot;)<\/p>\n<p style=\"margin-left:30px\">[System.Reflection.Assembly]::LoadWithPartialName(&quot;Microsoft.SharePoint.Client.Runtime&quot;)<\/p>\n<p>However, if you copied the assemblies manually somewhere, you might want to use <b>Add-Type<\/b>:<\/p>\n<p style=\"margin-left:30px\">Add-Type -Path &quot;c:\\folder\\Microsoft.SharePoint.Client.dll&quot;<\/p>\n<p style=\"margin-left:30px\">Add-Type -Path &quot;c:\\folder\\Microsoft.SharePoint.Client.Runtime.dll&quot;<\/p>\n<p>We&#039;ll add these types to all of our scripts today.<\/p>\n<h2>Authentication<\/h2>\n<p>After referencing our assemblies, we need to authenticate to SharePoint Online and get a <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/office\/microsoft.sharepoint.client.clientcontext(v=office.15).aspx\" target=\"_blank\">ClientContext<\/a> object. We use similar command when working with the Managed Client Object Model for SharePoint.<\/p>\n<p>First, store the path to the site collection we want to work with, in addition to the user name. Be sure to &nbsp;specify a user name that has permission to create sites. If you prefer, you could request all of these variables as parameters to your script.<\/p>\n<p style=\"margin-left:30px\">$siteUrl = &ldquo;https:\/\/mytenant.sharepoint.com\/sites\/mysitecollection&rdquo;<\/p>\n<p style=\"margin-left:30px\">$username = &quot;admin@mytenant.onmicrosoft.com&quot;<\/p>\n<p>Now, we need to read the password. The easiest way to do this is with <b>Read-Host<\/b> and the <b>AsSecureString<\/b> parameter. When you run the script, you will be prompted to type the password.<\/p>\n<p style=\"margin-left:30px\">$password = Read-Host -Prompt &quot;Enter password&quot; -AsSecureString<\/p>\n<p>We have everything we need to get a <b>ClientContext<\/b> now. Initialize a new one by using <b>New-Object<\/b> and pass it to <b>$siteUrl<\/b>. We&rsquo;ll name ours <b>$ctx<\/b>.<\/p>\n<p style=\"margin-left:30px\">$ctx = New-Object Microsoft.SharePoint.Client.ClientContext($siteUrl)<\/p>\n<p>Then we need to add the credentials by using the <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/office\/microsoft.sharepoint.client.sharepointonlinecredentials(v=office.15).aspx\" target=\"_blank\">SharePointOnlineCredentials<\/a> object, and pass <b>$username<\/b> and <b>$password<\/b> as parameters. &nbsp;Then, we assign <b>$credentials<\/b> to the <b>ClientContext<\/b> object.<\/p>\n<p style=\"margin-left:30px\">$credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $password)<\/p>\n<p style=\"margin-left:30px\">$ctx.Credentials = $credentials<\/p>\n<p>At this point, we can use our <b>ClientContext<\/b> object to create, delete, and retrieve a list of sites. We&rsquo;ll use the previous lines in all of our scripts.<\/p>\n<h2>Creating sites<\/h2>\n<p>In our first example, we&rsquo;ll start with a script to create a site. The beginning of the script will contain the assembly references and authentication script we showed above. When creating a site, we use the <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/office\/microsoft.sharepoint.client.webcreationinformation(v=office.15).aspx\" target=\"_blank\">WebCreationInformation<\/a> object.<\/p>\n<p>In the following script, I specify a relative URL to the site collection and a title. The <b>WebTemplate<\/b> parameter takes any supported web template in SharePoint Online. You can get a list of these by using SharePoint Online Management Shell and the <a href=\"http:\/\/technet.microsoft.com\/en-us\/library\/fp161378(v=office.15).aspx\" target=\"_blank\">Get-SPOWebTemplate<\/a> cmdlet. In the following example, I am using the Team Site template, which is <b>STS#0<\/b>.<\/p>\n<p style=\"margin-left:30px\">$webCreationInformation = New-Object Microsoft.SharePoint.Client.WebCreationInformation<\/p>\n<p style=\"margin-left:30px\">$webCreationInformation.Url = &quot;site1&quot;<\/p>\n<p style=\"margin-left:30px\">$webCreationInformation.Title = &quot;Site 1&quot;<\/p>\n<p style=\"margin-left:30px\">$webCreationInformation.WebTemplate = &quot;STS#0&quot;<\/p>\n<p style=\"margin-left:30px\">$newWeb = $ctx.Web.Webs.Add($webCreationInformation)<\/p>\n<p>We then pass the <b>WebCreationInformation<\/b> object to the <b>Webs<\/b> collection, which we find on our ClientContext.Web object.<\/p>\n<p>If you have used the Client Object Model before, you know you aren&rsquo;t done yet. You need to call <b>ClientContext.Load() <\/b>with <b>$newWeb<\/b>. We follow this with <b>ClientContext.ExecuteQuery()<\/b>.<\/p>\n<p style=\"margin-left:30px\">$ctx.Load($newWeb)<\/p>\n<p style=\"margin-left:30px\">$ctx.ExecuteQuery()<\/p>\n<p>This will send the request to SharePoint and your site will be created. &nbsp;Running the script won&rsquo;t yield any output.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/hsg-4-24-14-1.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/hsg-4-24-14-1.png\" alt=\"Image of website\" title=\"Image of website\" \/><\/a><\/p>\n<p>You might be tempted to add a <b>$newWeb<\/b> statement after the script executes. However, this will give you the following error message:<\/p>\n<p style=\"margin-left:30px\"><b>format-default<\/b> : The collection has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested.<\/p>\n<p>That&rsquo;s because, the <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/office\/microsoft.sharepoint.client.web(v=office.15).aspx\" target=\"_blank\">Web<\/a> object contains a number of collections that also need to be loaded explicitly by using <b>ClientContext.Load<\/b>. However, you can request properties such as the <b>Title<\/b> or <b>Url<\/b>.<\/p>\n<p>Write-Host &quot;Title&quot; $newWeb.Title<\/p>\n<h3>Complete script<\/h3>\n<p>Here is what the entire script looks like to create a site in SharePoint Online:<\/p>\n<p style=\"margin-left:30px\">Add-Type -Path &quot;c:\\folder\\Microsoft.SharePoint.Client.dll&quot;<\/p>\n<p style=\"margin-left:30px\">Add-Type -Path &quot;c:\\folder\\Microsoft.SharePoint.Client.Runtime.dll&quot;<\/p>\n<p>&nbsp;<\/p>\n<p style=\"margin-left:30px\">$siteUrl = &ldquo;https:\/\/mytenant.sharepoint.com\/sites\/mysitecollection&rdquo;<\/p>\n<p style=\"margin-left:30px\">$username = &quot;admin@mytenant.onmicrosoft.com&quot;<\/p>\n<p style=\"margin-left:30px\">$password = Read-Host -Prompt &quot;Enter password&quot; -AsSecureString<\/p>\n<p style=\"margin-left:30px\">$ctx = New-Object Microsoft.SharePoint.Client.ClientContext($siteUrl)<\/p>\n<p style=\"margin-left:30px\">$credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $password)<\/p>\n<p style=\"margin-left:30px\">$ctx.Credentials = $credentials<\/p>\n<p>&nbsp;<\/p>\n<p style=\"margin-left:30px\">$webCreationInformation = New-Object Microsoft.SharePoint.Client.WebCreationInformation<\/p>\n<p style=\"margin-left:30px\">$webCreationInformation.Url = &quot;site1&quot;<\/p>\n<p style=\"margin-left:30px\">$webCreationInformation.Title = &quot;Site 1&quot;<\/p>\n<p style=\"margin-left:30px\">$webCreationInformation.WebTemplate = &quot;STS#0&quot;<\/p>\n<p style=\"margin-left:30px\">$newWeb = $ctx.Web.Webs.Add($webCreationInformation)<\/p>\n<p>&nbsp;<\/p>\n<p style=\"margin-left:30px\">$ctx.Load($newWeb)<\/p>\n<p style=\"margin-left:30px\">$ctx.ExecuteQuery()<\/p>\n<p style=\"margin-left:30px\">$newWeb<\/p>\n<p style=\"margin-left:30px\">Write-Host &quot;Title&quot; $newWeb.Title<\/p>\n<h2>Deleting sites<\/h2>\n<p>To delete a site, the process is fairly similar. Instead of setting the <b>ClientContext<\/b> URL to the site collection, set it to the site that you want to delete:<\/p>\n<p style=\"margin-left:30px\">$siteUrl = &ldquo;https:\/\/mytenant.sharepoint.com\/sites\/sitecollection\/site1&rdquo;<\/p>\n<p>After we add the script for the references and authentication, get a reference to <b>ClientContex.Web<\/b>, load it, and call <b>ExecuteQuery()<\/b>.<\/p>\n<p style=\"margin-left:30px\">$web = $ctx.Web<\/p>\n<p style=\"margin-left:30px\">$ctx.Load($web)<\/p>\n<p style=\"margin-left:30px\">$ctx.ExecuteQuery()<\/p>\n<p>Finally, call the <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/office\/microsoft.sharepoint.client.web.deleteobject(v=office.15).aspx\" target=\"_blank\">Web.DeleteObject method<\/a> to delete the site. This will require an additional call to <b>ExecuteQuery<\/b> to finalize the deletion.<\/p>\n<p style=\"margin-left:30px\">$web.DeleteObject()<\/p>\n<p style=\"margin-left:30px\">$ctx.ExecuteQuery()<\/p>\n<p>At this point, the site has been deleted.<\/p>\n<h3>Complete script<\/h3>\n<p>Here is the complete script for deleting a site in SharePoint Online:<\/p>\n<p style=\"margin-left:30px\">Add-Type -Path &quot;c:\\folder\\Microsoft.SharePoint.Client.dll&quot;<\/p>\n<p style=\"margin-left:30px\">Add-Type -Path &quot;c:\\folder\\Microsoft.SharePoint.Client.Runtime.dll&quot;<\/p>\n<p>&nbsp;<\/p>\n<p style=\"margin-left:30px\">$siteUrl = &ldquo;https:\/\/mytenant.sharepoint.com\/sites\/mysitecollection\/site1&rdquo;<\/p>\n<p style=\"margin-left:30px\">$password = Read-Host -Prompt &quot;Enter password&quot; -AsSecureString<\/p>\n<p style=\"margin-left:30px\">$ctx = New-Object Microsoft.SharePoint.Client.ClientContext($siteUrl)<\/p>\n<p style=\"margin-left:30px\">$credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials(&quot;admin@mytenant.onmicrosoft.com&quot;, $password)<\/p>\n<p style=\"margin-left:30px\">$ctx.Credentials = $credentials<\/p>\n<p>&nbsp;<\/p>\n<p style=\"margin-left:30px\">$web = $ctx.Web<\/p>\n<p>&nbsp;<\/p>\n<p style=\"margin-left:30px\">$ctx.Load($web)<\/p>\n<p style=\"margin-left:30px\">$ctx.ExecuteQuery()<\/p>\n<p>&nbsp;<\/p>\n<p style=\"margin-left:30px\">$web.DeleteObject()<\/p>\n<p style=\"margin-left:30px\">$ctx.ExecuteQuery()<\/p>\n<p style=\"margin-left:30px\">Write-Host $web.Title &quot;Site Deleted&quot;<\/p>\n<h2>Getting a list of sites<\/h2>\n<p>Retrieving a list of sites is a bit more complicated, because of the load requirements around the <b>Web<\/b> object. Chris O&#039;Brien&#039;s post, <a href=\"http:\/\/www.sharepointnutsandbolts.com\/2013\/12\/Using-CSOM-in-PowerShell-scripts-with-Office365.html\" target=\"_blank\">Using CSOM in PowerShell scripts with Office 365<\/a>, pointed me in the right direction to make this work. In this script, we&rsquo;ll return all subsites of the site collection in SharePoint Online. We&rsquo;ll start the script by using the same script as before to add references and authentication.<\/p>\n<p>Start by getting a reference to the root web of the site collection:<\/p>\n<p style=\"margin-left:30px\">$rootWeb = $ctx.Web<\/p>\n<p>Next, we use the <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/office\/microsoft.sharepoint.client.web.webs(v=office.15).aspx\" target=\"_blank\">Webs property<\/a> of the <b>Web<\/b> object to get the list of all subsites. We then need to load both these objects and call <b>ClientContext.ExecuteQuery()<\/b>.<\/p>\n<p style=\"margin-left:30px\">$ctx.Load($rootWeb)<\/p>\n<p style=\"margin-left:30px\">$ctx.Load($sites)<\/p>\n<p style=\"margin-left:30px\">$ctx.ExecuteQuery()<\/p>\n<p>Unfortunately, you can&rsquo;t simply call <b>$sites<\/b> to see a nice list. You need to iterate through each subsite and use <b>ClientContext.Load<\/b> and <b>ClientContext.ExecuteQuery()<\/b> to populate the values. That means the script makes a round-trip to the server once for each site, which is not exactly efficient. Here&rsquo;s how we iterate through the sites and write out the <b>Title<\/b> and <b>Url<\/b> properties:<\/p>\n<p style=\"margin-left:30px\">foreach($site in $sites)<\/p>\n<p style=\"margin-left:30px\">{<\/p>\n<p style=\"margin-left:30px\">&nbsp; $ctx.Load($site)<\/p>\n<p style=\"margin-left:30px\">&nbsp; $ctx.ExecuteQuery()<\/p>\n<p>&nbsp;<\/p>\n<p style=\"margin-left:30px\">&nbsp; Write-Host $site.Title &quot;-&quot; $site.Url<\/p>\n<p style=\"margin-left:30px\">}<\/p>\n<p>The script looks like this when executed:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/hsg-4-24-14-2.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/hsg-4-24-14-2.png\" alt=\"Image of command output\" title=\"Image of command output\" \/><\/a><\/p>\n<p>You&rsquo;ll notice this returns all subsites including those used by apps. That&rsquo;s why you see Yammer in the list. You could write additional script to filter that, if desired.<\/p>\n<h3>Complete script<\/h3>\n<p>Here is the complete script to get all sites in a site collection from SharePoint Online:<\/p>\n<p style=\"margin-left:30px\">Add-Type -Path &quot;c:\\folder\\Microsoft.SharePoint.Client.dll&quot;<\/p>\n<p style=\"margin-left:30px\">Add-Type -Path &quot;c:\\folder\\Microsoft.SharePoint.Client.Runtime.dll&quot;<\/p>\n<p>&nbsp;<\/p>\n<p style=\"margin-left:30px\">$siteUrl = &quot;https:\/\/mytenant.sharepoint.com\/sites\/mysitecollection&quot;<\/p>\n<p style=\"margin-left:30px\">$password = Read-Host -Prompt &quot;Enter password&quot; -AsSecureString<\/p>\n<p style=\"margin-left:30px\">$ctx = New-Object Microsoft.SharePoint.Client.ClientContext($siteUrl)<\/p>\n<p style=\"margin-left:30px\">$credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials(&quot;admin@mytenant.onmicrosoft.com&quot;, $password)<\/p>\n<p style=\"margin-left:30px\">$ctx.Credentials = $credentials<\/p>\n<p>&nbsp;<\/p>\n<p style=\"margin-left:30px\">$rootWeb = $ctx.Web<\/p>\n<p style=\"margin-left:30px\">$sites = $rootWeb.Webs<\/p>\n<p>&nbsp;<\/p>\n<p style=\"margin-left:30px\">$ctx.Load($rootWeb)<\/p>\n<p style=\"margin-left:30px\">$ctx.Load($sites)<\/p>\n<p style=\"margin-left:30px\">$ctx.ExecuteQuery()<\/p>\n<p>&nbsp;<\/p>\n<p style=\"margin-left:30px\">foreach($site in $sites)<\/p>\n<p style=\"margin-left:30px\">{<\/p>\n<p style=\"margin-left:30px\">&nbsp; $ctx.Load($site)<\/p>\n<p style=\"margin-left:30px\">&nbsp; $ctx.ExecuteQuery()<\/p>\n<p>&nbsp;<\/p>\n<p style=\"margin-left:30px\">&nbsp; Write-Host $site.Title &quot;-&quot; $site.Url<\/p>\n<p style=\"margin-left:30px\">}<\/p>\n<p>By using the Client Script Object Model, you can automate more tasks in SharePoint Online. If you are going to be at TechEd North America this year, be sure to check out my session, Windows PowerShell&nbsp;3.0 Administration with Microsoft SharePoint 2013 and SharePoint Online (OFC-B328). We&rsquo;ll cover this example and more for SharePoint Online and SharePoint on-premises.<\/p>\n<p>~Corey<\/p>\n<p style=\"margin-left:30px\"><b>Note &nbsp;<\/b>Corey has also agreed to be a special guest at the Scripting Guys booth at TechEd. So that will be a great time to meet with Corey and to have all your Windows PowerShell and SharePoint questions answered. WooHoo!<\/p>\n<p>Thank you, Corey, for sharing this. Join me tomorrow when I will talk about more cool Windows PowerShell stuff.<\/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><strong>Ed Wilson, Microsoft Scripting Guy<\/strong>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary: Guest blogger, Corey Roth, talks about using Windows PowerShell to create and manage SharePoint online sites. Microsoft Scripting Guy, Ed Wilson, is here. Today we have a guest post by SharePoint MVP, Corey Roth. Corey will be presenting at TechEd&nbsp;2014 this year in Houston, and he has taken the time to share his thoughts [&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":[505,3,59,45],"class_list":["post-1541","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-deployment-and-upgrade","tag-scripting-guy","tag-sharepoint","tag-windows-powershell"],"acf":[],"blog_post_summary":"<p>Summary: Guest blogger, Corey Roth, talks about using Windows PowerShell to create and manage SharePoint online sites. Microsoft Scripting Guy, Ed Wilson, is here. Today we have a guest post by SharePoint MVP, Corey Roth. Corey will be presenting at TechEd&nbsp;2014 this year in Houston, and he has taken the time to share his thoughts [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/1541","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=1541"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/1541\/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=1541"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=1541"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=1541"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}