<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Azure in a nutshell</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/ranand12/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/ranand12/feed.xml</link>
    <description />
    <lastBuildDate>Tue, 16 Apr 2019 05:25:27 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Azure Serverless Computing Explained in less than 5 minutes #LessThan5Min</title>
      <link>https://docs.microsoft.com/archive/blogs/ranand12/azure-serverless-computing-explained-in-less-than-5-minutes-lessthan5min</link>
      <pubDate>Mon, 18 Dec 2017 23:20:19 GMT</pubDate>
      <dc:creator><![CDATA[ranand12]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ranand12/?p=175</guid>
      <description><![CDATA[This is my attempt at explaining Azure Serverless Computing in less than 5 minutes. This also...]]></description>
      <content:encoded><![CDATA[This is my attempt at explaining Azure Serverless Computing in less than 5 minutes. This also contains an end to end demo of serverless computing using Azure Logic Apps, Azure Cognitive services and Azure Functions.

&nbsp;

https://www.youtube.com/watch?v=7tP43V3cl5U]]></content:encoded>
    </item>
    <item>
      <title>Azure Cognitive Services with Azure Logic apps - Errors and Workarounds</title>
      <link>https://docs.microsoft.com/archive/blogs/ranand12/azureai_cogservices</link>
      <pubDate>Fri, 25 Aug 2017 19:52:40 GMT</pubDate>
      <dc:creator><![CDATA[ranand12]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ranand12/?p=106</guid>
      <description><![CDATA[&nbsp;

Recently I was working to build a logic app that could analyze tweets using Azure...]]></description>
      <content:encoded><![CDATA[&nbsp;

Recently I was working to build a logic app that could analyze tweets using Azure Cognitive services and for each picture in the tweet detect all of the faces.  I ran into an issue because it requires nested for each loops (a tweet could have many pictures, and a picture could have many faces).  Here’s how I was able to work around it while these feature is ready to roll out into production in the next week ( Sept 2017)

<span style="text-decoration: underline"><strong>Error 1 </strong></span>

<a href="https://msdnshared.blob.core.windows.net/media/2017/08/132.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/08/132.png" alt="" width="1168" height="1209" class="alignnone size-full wp-image-136" /></a>

When you try to add another foreach to get the output from a Face API output – you will might get the below error (please note this error should be fixed by the first week of September 2017), however in the mean time you can use the below workaround to get past the error.

The error that you will get is - <em><strong>This output is an array. A foreach cannot be nested inside of another foreach.</strong></em>

&nbsp;

<span style="text-decoration: underline"><strong>Workaround </strong></span>

This is because Face API returns an arrary, in order to workaround this error – you can perform the same action by going to the following URL to access your subscription – <a href="https://aka.ms/nestedforeach">https://aka.ms/nestedforeach</a> ( this should be fixed in the general release starting next week). You would then be redirected to a newer version which would be something like below:

<a href="https://msdnshared.blob.core.windows.net/media/2017/08/217.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/08/217.png" alt="" width="2735" height="330" class="alignnone size-full wp-image-116" /></a>

Once you are in there – you will be able to edit the Azure Logic App and add the required variables without running into the above error.  However you might run into another error when might run into another error which is addressed below

<span><strong>Error 2</strong></span>

&nbsp;

<span style="text-decoration: underline"><strong>Update 8/28/2017 - Thanks to the amazing peeps at our Microsoft Product Group -  this issue was fixed just ONE day post reporting to them  :)  PS: the below error may not be relevant anymore. </strong></span>

Once you are in the newer version by clicking on the link, you will then be able to add the output variables from the Azure Cognitive Services Face API, however once you click to add one of the output variables – you will see that the ability to add more of the output variables is disabled. Please refer screenshot below. This issue too should be fixed by the first week of September 2017. However in order to workaround the error follow the steps mentioned below
<ul>
 	<li>You will be able to add the first output value, but the minute you add that – the ability to add more output variables from the Azure Cognitive Services Face API is disabled.</li>
</ul>
<a href="https://msdnshared.blob.core.windows.net/media/2017/08/323.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/08/323.png" alt="" width="1217" height="1254" class="alignnone size-full wp-image-146" /></a>

<span><strong>Workaround</strong></span>

In order to workaround this – you will need to go to the code. Before going to the code view – fill out place holder values for the fields as text fields – Example : AgeText, GlassesText etc – so that it is easier to replace the placeholder.

Go to the step where you see the variable, in this case – smile, see highlighted

<a href="https://msdnshared.blob.core.windows.net/media/2017/08/414.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/08/414.png" alt="" width="1463" height="424" class="alignnone size-full wp-image-125" /></a>

Replace those
<ul>
 	<li>GenderText --&gt; @{items('For_each_2')?['faceAttributes']?['gender']}</li>
 	<li>Glasses --&gt; @{items('For_each_2')?['faceAttributes']?[glasses]}</li>
 	<li>Smile --&gt; @{items('For_each_2')?['faceAttributes']?[smile]}</li>
</ul>
And then you will be a happy person [smile ratio – 1.0 :)]

<a href="https://msdnshared.blob.core.windows.net/media/2017/08/511.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/08/511.png" alt="" width="745" height="961" class="alignnone size-full wp-image-155" /></a>

<span style="text-decoration: underline"><strong></strong></span>

Cheers

Anand Kumar R]]></content:encoded>
    </item>
    <item>
      <title>The ridiculously simple Azure NSG tool</title>
      <link>https://docs.microsoft.com/archive/blogs/ranand12/nsgtool</link>
      <pubDate>Tue, 04 Apr 2017 19:41:50 GMT</pubDate>
      <dc:creator><![CDATA[ranand12]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ranand12/?p=75</guid>
      <description><![CDATA[If you had referred to my previous article on NSG...]]></description>
      <content:encoded><![CDATA[If you had referred to my previous article on NSG -<a href="https://blogs.msdn.microsoft.com/ranand12/2017/04/04/nsg/"> https://blogs.msdn.microsoft.com/ranand12/2017/04/04/nsg/ </a>you would have seen me reference a tool .. a ridiculously simple Azure NSG tool :)

Here is the link to download the tool - go ahead download it give it a shot and let me know what you guys think - <a href="https://aka.ms/nsgtool">https://aka.ms/nsgtool</a>

&nbsp;

Cheers

Happy Learning

Anand Kumar R]]></content:encoded>
    </item>
    <item>
      <title>Azure Network Security Groups - Explained in Less than 5 minutes</title>
      <link>https://docs.microsoft.com/archive/blogs/ranand12/nsg</link>
      <pubDate>Tue, 04 Apr 2017 19:34:40 GMT</pubDate>
      <dc:creator><![CDATA[ranand12]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ranand12/?p=66</guid>
      <description><![CDATA[Here is the start of an ongoing series which I intend to cover for Azure and other peripheral...]]></description>
      <content:encoded><![CDATA[Here is the start of an ongoing series which I intend to cover for Azure and other peripheral technologies. In this post - we will try to explain Network Security Groups in Azure in a quick and simple way :) As always any feedback is most welcome.

&nbsp;

[embed]https://www.youtube.com/watch?v=vgnSLuf_zj0[/embed]

Cheers ! Happy learning

Anand Kumar R]]></content:encoded>
    </item>
    <item>
      <title>Azure Automation in Azure Government</title>
      <link>https://docs.microsoft.com/archive/blogs/ranand12/azure-automation-in-azure-government</link>
      <pubDate>Fri, 09 Oct 2015 09:06:38 GMT</pubDate>
      <dc:creator><![CDATA[ranand12]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ranand12/2015/10/09/azure-automation-in-azure-government/</guid>
      <description><![CDATA[&nbsp;
If you have been following closely, you would have realized Azure Automation is now...]]></description>
      <content:encoded><![CDATA[<div class="WordSection1">
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">If you have been following closely, you would have realized Azure Automation is now available for Azure GOV. There are a couple of things you need to keep in mind when you are trying to run your first automation script with Azure GOV. I&rsquo;m going to be outlining the steps below:</p>
<p class="MsoNormal">&nbsp;</p>
<h2>Step 1 -&nbsp; Create a certificate with makecert (or you could use IIS too)</h2>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/72/04/0815.image001.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-72-04/0815.image001.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/72/04/0815.image001.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-72-04/0815.image001.jpg" alt="" border="0" /></a></p>
<h2>&nbsp;</h2>
<h2>Step 2 &ndash; Install the certificate in the <strong>CurrentUser</strong>&rsquo;s <strong>Personal</strong> Certificate Store</h2>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/72/04/3704.image002.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-72-04/3704.image002.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/72/04/3704.image002.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-72-04/3704.image002.jpg" alt="" border="0" /></a></p>
<p class="MsoNormal"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/72/04/3568.image003.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-72-04/3568.image003.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/72/04/3568.image003.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-72-04/3568.image003.jpg" alt="" border="0" /></a></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span style="font-size: 13.0pt; line-height: 107%; font-family: 'Calibri Light',sans-serif; color: #2e74b5;">Step 3 &ndash; Upload this certificate in the management certificate section of the Azure Subscription (the .CER file ) </span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/72/04/7384.image004.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-72-04/7384.image004.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/72/04/7384.image004.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-72-04/7384.image004.jpg" alt="" border="0" /></a></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span style="font-size: 13.0pt; line-height: 107%; font-family: 'Calibri Light',sans-serif; color: #2e74b5;">Step 4 &ndash; Now export the certificate from the personal store using a password and save it to a .PFX file </span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/72/04/6787.image005.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-72-04/6787.image005.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/72/04/6787.image005.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-72-04/6787.image005.jpg" alt="" border="0" /></a></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/72/04/6758.image006.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-72-04/6758.image006.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/72/04/6758.image006.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-72-04/6758.image006.jpg" alt="" border="0" /></a></p>
<p class="MsoNormal"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/72/04/2818.image007.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-72-04/2818.image007.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/72/04/2818.image007.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-72-04/2818.image007.jpg" alt="" border="0" /></a></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/72/04/8270.image008.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-72-04/8270.image008.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/72/04/8270.image008.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-72-04/8270.image008.jpg" alt="" border="0" /></a></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span style="font-size: 13.0pt; line-height: 107%; font-family: 'Calibri Light',sans-serif; color: #2e74b5;">Step 5 &ndash; Now add the .PFX file as an asset onto Azure Automation </span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/72/04/8400.image009.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-72-04/8400.image009.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/72/04/8400.image009.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-72-04/8400.image009.jpg" alt="" border="0" /></a></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/72/04/1817.image010.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-72-04/1817.image010.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/72/04/1817.image010.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-72-04/1817.image010.jpg" alt="" border="0" /></a></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/72/04/4784.image011.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-72-04/4784.image011.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/72/04/4784.image011.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-72-04/4784.image011.jpg" alt="" border="0" /></a></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span style="font-size: 13.0pt; line-height: 107%; font-family: 'Calibri Light',sans-serif; color: #2e74b5;">Step 6 &ndash; Create variables for &lsquo;SubscriptionName&rsquo; and &lsquo;SubscriptionID&rsquo;</span></p>
<p class="MsoNormal"><span style="font-size: 13.0pt; line-height: 107%; font-family: 'Calibri Light',sans-serif; color: #2e74b5;">Step 7 &ndash; Create a Runbook under Automation and enter the following to establish a connection and get started. The ones that we need to explicitly add for the Azure Government are highlighted below </span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: white; text-autospace: none;"><span style="font-size: 9.0pt; font-family: 'Lucida Console'; color: darkblue;">workflow</span><span style="font-size: 9.0pt; font-family: 'Lucida Console';"> <span style="color: blueviolet;">AnandTestRunbook</span></span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: white; text-autospace: none;"><span style="font-size: 9.0pt; font-family: 'Lucida Console';">{ </span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: white; text-autospace: none;"><span style="font-size: 9.0pt; font-family: 'Lucida Console';">&nbsp; </span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: white; text-autospace: none;"><span style="font-size: 9.0pt; font-family: 'Lucida Console'; color: blue; background: yellow;">Add-AzureEnvironment</span><span style="font-size: 9.0pt; font-family: 'Lucida Console'; background: yellow;"> <span style="color: navy;">-name</span> <span style="color: darkred;">&ldquo;AzureGovernment&rdquo;</span> <span style="color: navy;">-serviceendpoint</span> <span style="color: darkred;"><a href="https://management.core.usgovcloudapi.net">https://management.core.usgovcloudapi.net</a></span></span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: white; text-autospace: none;"><span style="font-size: 9.0pt; font-family: 'Lucida Console';">&nbsp;</span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: white; text-autospace: none;"><span style="font-size: 9.0pt; font-family: 'Lucida Console'; color: orangered;">$subscriptionID</span><span style="font-size: 9.0pt; font-family: 'Lucida Console';"> <span style="color: darkgray;">=</span> <span style="color: blue;">Get-AutomationVariable</span> <span style="color: navy;">-Name</span> <span style="color: darkred;">'SubscriptionID'</span></span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: white; text-autospace: none;"><span style="font-size: 9.0pt; font-family: 'Lucida Console';">&nbsp;</span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: white; text-autospace: none;"><span style="font-size: 9.0pt; font-family: 'Lucida Console'; color: orangered;">$subscriptionname</span><span style="font-size: 9.0pt; font-family: 'Lucida Console';"> <span style="color: darkgray;">=</span> <span style="color: blue;">Get-AutomationVariable</span> <span style="color: navy;">-Name</span> <span style="color: darkred;">'SubscriptionName'</span></span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: white; text-autospace: none;"><span style="font-size: 9.0pt; font-family: 'Lucida Console';">&nbsp;</span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: white; text-autospace: none;"><span style="font-size: 9.0pt; font-family: 'Lucida Console'; color: orangered;">$certificate</span><span style="font-size: 9.0pt; font-family: 'Lucida Console';"> <span style="color: darkgray;">=</span> <span style="color: blue;">Get-AutomationCertificate</span> <span style="color: navy;">-Name</span> <span style="color: darkred;">'AnandAzureAutomationCertificate'</span></span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: white; text-autospace: none;"><span style="font-size: 9.0pt; font-family: 'Lucida Console';">&nbsp;</span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: white; text-autospace: none;"><span style="font-size: 9.0pt; font-family: 'Lucida Console'; color: blue;">Set-AzureSubscription</span><span style="font-size: 9.0pt; font-family: 'Lucida Console';"> <span style="color: navy;">-SubscriptionName</span> <span style="color: orangered;">$subscriptionName</span> <span style="color: navy;">-SubscriptionId</span> <span style="color: orangered;">$subscriptionID</span> <span style="color: navy;">-Certificate</span> <span style="color: orangered;">$certificate</span> <span style="color: navy; background: yellow;">-Environment</span><span style="background: yellow;"> <span style="color: darkred;">"AzureGovernment"</span></span>&nbsp; </span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: white; text-autospace: none;"><span style="font-size: 9.0pt; font-family: 'Lucida Console';">&nbsp;</span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: white; text-autospace: none;"><span style="font-size: 9.0pt; font-family: 'Lucida Console'; color: blue;">Select-AzureSubscription</span><span style="font-size: 9.0pt; font-family: 'Lucida Console';"> <span style="color: navy;">-name</span> <span style="color: orangered;">$subscriptionname</span> </span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: white; text-autospace: none;"><span style="font-size: 9.0pt; font-family: 'Lucida Console';">&nbsp;</span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: white; text-autospace: none;"><span style="font-size: 9.0pt; font-family: 'Lucida Console';">}</span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: white; text-autospace: none;"><span style="font-size: 9.0pt; font-family: 'Lucida Console';">&nbsp;</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span style="font-size: 13.0pt; line-height: 107%; font-family: 'Calibri Light',sans-serif; color: #2e74b5;">Step 8 &ndash; From here on you are good to go, you should be able to use it how you would normally use an Azure Automation script</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Good luck and Happy Automating!!</p>
</div>]]></content:encoded>
    </item>
    <item>
      <title>SQL Always on Availability Groups – on Azure (Things you might oversee)</title>
      <link>https://docs.microsoft.com/archive/blogs/ranand12/sql-always-on-availability-groups-on-azure-things-you-might-oversee</link>
      <pubDate>Thu, 08 Oct 2015 16:55:00 GMT</pubDate>
      <dc:creator><![CDATA[ranand12]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ranand12/2015/10/08/sql-always-on-availability-groups-on-azure-things-you-might-oversee/</guid>
      <description><![CDATA[There are tons of good documentation out there for SQL Always on AGs on Azure, here are some of...]]></description>
      <content:encoded><![CDATA[<div class="WordSection1">
<p class="MsoTitle">There are tons of good documentation out there for SQL Always on AGs on Azure, here are some of the most comprehensive ones:</p>
<p class="MsoListParagraphCxSpFirst" style="text-indent: -.25in;"><span style="font-family: Symbol;">&middot;<span style="font: 7.0pt 'Times New Roman';">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span>SQL ALWAYS ON GUI - <a href="https://msdn.microsoft.com/en-us/library/azure/dn249504.aspx">https://msdn.microsoft.com/en-us/library/azure/dn249504.aspx</a></p>
<p class="MsoListParagraphCxSpMiddle" style="text-indent: -.25in;"><span style="font-family: Symbol;">&middot;<span style="font: 7.0pt 'Times New Roman';">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span>SQL ALWAYS ON POWERSHELL - <a href="https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-sql-server-alwayson-availability-groups-powershell/?rnd=1">https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-sql-server-alwayson-availability-groups-powershell/?rnd=1</a></p>
<p class="MsoListParagraphCxSpLast">&nbsp;</p>
<p class="MsoNormal">I would highly recommend you go through both of these articles in both the articles above, as good as they are, there are still some things which you might oversee ( at least I did <span style="font-family: Wingdings;">J</span> ), especially in a secured environment.</p>
<p class="MsoNormal">&nbsp;</p>
<h1>Network Security Groups</h1>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">How has NSGs got to do anything with configuring SQL Always on, you ask? Well, some organizations block out all WAN (INTERNET) traffic through a NSG rule (both inbound and outbound). So why should this affect your ILB configuration? The key word &ndash; &ldquo;AZURE_LOADBALANCER&rdquo; represents a datacenter IP in Azure which is used to monitor probes from the load balancer to determine the health state of virtual machines in a load balanced set. &nbsp;Therefore, blocking this out would prevent the ILB from working and hence affect the working of the SQL Always on AG. If you have to deny &ldquo;INTERNET&rdquo; traffic through a NSG rule, please ensure you add another rule to the Network Security Group which has an allow from the &ldquo;AZURE_LOADBALANCER&rdquo; with a higher priority. Will write another detailed blog on this &ndash; on the working of NSGs and ILBs</p>
<p class="MsoNormal">&nbsp;</p>
<h1>Cluster Object</h1>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Ensure that the user performing the configuration on the SQL servers for Always on has permissions to create the Cluster Object on the domain (or) have an object pre-created.</p>
<p class="MsoNormal">&nbsp;</p>
<h1>Cluster Probe Script</h1>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">If you are running Windows Server 2012 &ndash; ensure you run this below script :</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: white; text-autospace: none;"><span style="font-size: 9.0pt; font-family: 'Lucida Console'; color: orangered;">$ClusterNetworkName</span><span style="font-size: 9.0pt; font-family: 'Lucida Console';"> <span style="color: darkgray;">=</span> <span style="color: darkred;">"&lt;MyClusterNetworkName&gt;"</span> <span style="color: darkgreen;"># the cluster network name (Use Get-ClusterNetwork on Windows Server 2012 of higher to find the name)</span></span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: white; text-autospace: none;"><span style="font-size: 9.0pt; font-family: 'Lucida Console'; color: orangered;">$IPResourceName</span><span style="font-size: 9.0pt; font-family: 'Lucida Console';"> <span style="color: darkgray;">=</span> <span style="color: darkred;">"&lt;IPResourceName&gt;"</span> <span style="color: darkgreen;"># the IP Address resource name </span></span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: white; text-autospace: none;"><span style="font-size: 9.0pt; font-family: 'Lucida Console'; color: orangered;">$ILBIP</span><span style="font-size: 9.0pt; font-family: 'Lucida Console';"> <span style="color: darkgray;">=</span> <span style="color: darkred;">&ldquo;&lt;X.X.X.X&gt;&rdquo;</span> <span style="color: darkgreen;"># the IP Address of the Internal Load Balancer (ILB)</span></span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: white; text-autospace: none;"><span style="font-size: 9.0pt; font-family: 'Lucida Console';">&nbsp;</span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: white; text-autospace: none;"><span style="font-size: 9.0pt; font-family: 'Lucida Console'; color: blue;">Import-Module</span><span style="font-size: 9.0pt; font-family: 'Lucida Console';"> <span style="color: blueviolet;">FailoverClusters</span></span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: white; text-autospace: none;"><span style="font-size: 9.0pt; font-family: 'Lucida Console'; color: blue;">Get-ClusterResource</span><span style="font-size: 9.0pt; font-family: 'Lucida Console';"> <span style="color: orangered;">$IPResourceName</span> <span style="color: darkgray;">|</span> <span style="color: blue;">Set-ClusterParameter</span> <span style="color: navy;">-Multiple</span> @{<span style="color: darkred;">"Address"</span><span style="color: darkgray;">=</span><span style="color: darkred;">"</span><span style="color: orangered;">$ILBIP</span><span style="color: darkred;">"</span>;<span style="color: darkred;">"ProbePort"</span><span style="color: darkgray;">=</span><span style="color: darkred;">"59999"</span>;<span style="color: darkred;">"SubnetMask"</span><span style="color: darkgray;">=</span><span style="color: darkred;">"255.255.255.255"</span>;<span style="color: darkred;">"Network"</span><span style="color: darkgray;">=</span><span style="color: darkred;">"</span><span style="color: orangered;">$ClusterNetworkName</span><span style="color: darkred;">"</span>;<span style="color: darkred;">"OverrideAddressMatch"</span><span style="color: darkgray;">=</span><span style="color: purple;">1</span>;<span style="color: darkred;">"EnableDhcp"</span><span style="color: darkgray;">=</span><span style="color: purple;">0</span>}</span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: white; text-autospace: none;"><span style="font-size: 9.0pt; font-family: 'Lucida Console';">&nbsp;</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">If you are running Windows Server 2008 &ndash; run this :</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: white; text-autospace: none;"><span style="font-size: 9.0pt; font-family: 'Lucida Console'; color: orangered;">$ClusterNetworkName</span><span style="font-size: 9.0pt; font-family: 'Lucida Console';"> <span style="color: darkgray;">=</span> <span style="color: darkred;">"&lt;MyClusterNetworkName&gt;"</span> <span style="color: darkgreen;"># the cluster network name (Use Get-ClusterNetwork on Windows Server 2012 of higher to find the name)</span></span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: white; text-autospace: none;"><span style="font-size: 9.0pt; font-family: 'Lucida Console'; color: orangered;">$IPResourceName</span><span style="font-size: 9.0pt; font-family: 'Lucida Console';"> <span style="color: darkgray;">=</span> <span style="color: darkred;">"&lt;IPResourceName&gt;"</span> <span style="color: darkgreen;"># the IP Address resource name </span></span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: white; text-autospace: none;"><span style="font-size: 9.0pt; font-family: 'Lucida Console'; color: orangered;">$ILBIP</span><span style="font-size: 9.0pt; font-family: 'Lucida Console';"> <span style="color: darkgray;">=</span> <span style="color: darkred;">&ldquo;&lt;X.X.X.X&gt;&rdquo;</span> <span style="color: darkgreen;"># the IP Address of the Internal Load Balancer (ILB)</span></span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: white; text-autospace: none;"><span style="font-size: 9.0pt; font-family: 'Lucida Console';">&nbsp;</span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: white; text-autospace: none;"><span style="font-size: 9.0pt; font-family: 'Lucida Console'; color: blue;">Import-Module</span><span style="font-size: 9.0pt; font-family: 'Lucida Console';"> <span style="color: blueviolet;">FailoverClusters</span></span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: white; text-autospace: none;"><span style="font-size: 9.0pt; font-family: 'Lucida Console'; color: blue;">cluster</span><span style="font-size: 9.0pt; font-family: 'Lucida Console';"> <span style="color: blueviolet;">res</span> <span style="color: orangered;">$IPResourceName</span> <span style="color: blueviolet;">/priv</span> <span style="color: blueviolet;">enabledhcp=0</span> <span style="color: blueviolet;">overrideaddressmatch=1</span> <span style="color: blueviolet;">address=</span><span style="color: orangered;">$ILBIP</span> <span style="color: blueviolet;">probeport=59999</span>&nbsp; <span style="color: blueviolet;">subnetmask=255.255.255.255</span></span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: white; text-autospace: none;"><span style="font-size: 9.0pt; font-family: 'Lucida Console';">&nbsp;</span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">IMPORTANT : BRING THE IP ADDRESS &ndash; offline and then bring it back online once you run this script. The probe port configuration is only complete if you bring it offline and then back online.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Once again, this might not be the best post for Azure SQL AG configuration and there could be tons of other things to look at, but these are my learnings :)&nbsp;</p>
</div>]]></content:encoded>
    </item>
    <item>
      <title>Listing all subnets in an Azure Virtual Network</title>
      <link>https://docs.microsoft.com/archive/blogs/ranand12/listing-all-subnets-in-an-azure-virtual-network</link>
      <pubDate>Mon, 28 Sep 2015 12:01:00 GMT</pubDate>
      <dc:creator><![CDATA[ranand12]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ranand12/2015/09/28/listing-all-subnets-in-an-azure-virtual-network/</guid>
      <description><![CDATA[Listing all Subnets in an Azure Virtual Network
&nbsp;
So you want to list ALL the subnets...]]></description>
      <content:encoded><![CDATA[<div class="WordSection1">
<p class="MsoNormal">Listing all Subnets in an Azure Virtual Network</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">So you want to list ALL the subnets within an Azure Virtual Network and you try to look for an available PowerShell command (get-azuresubnet only works at a VM level) and you realize there isn&rsquo;t any. Fret not, there is a simple way to get this done.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">The Virtual Network configuration file is your friend.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: #012456; text-autospace: none;"><span style="font-size: xx-small; font-family: 'Lucida Console'; color: #f5f5f5;">$VNetConfig = Get-AzureVNetConfig </span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: #012456; text-autospace: none;"><span style="font-size: xx-small; font-family: 'Lucida Console'; color: #f5f5f5;">[xml]$VNetConfigXML = $VNetConfig.XMLConfiguration</span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: #012456; text-autospace: none;"><span style="font-size: xx-small; font-family: 'Lucida Console'; color: #f5f5f5;">&nbsp;</span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: #012456; text-autospace: none;"><span style="font-size: xx-small; font-family: 'Lucida Console'; color: #f5f5f5;">$subnets = $VNetConfigXML.DocumentElement.VirtualNetworkConfiguration.VirtualNetworkSites.VirtualNetworkSite.Subnets </span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Your $subnets parameter now has all the Subnet information, you can filter it by an IF statement if you just need the subnets from one of the Virtual Network Sites.</p>
<p class="MsoNormal">If you then run a loop, you will be able to fetch all the subnet names and the IP address prefix within an Azure VNet</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: #012456; text-autospace: none;"><span style="font-size: x-small; font-family: 'Lucida Console'; color: #f5f5f5;">foreach ($subnet in $subnets) </span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: #012456; text-autospace: none;"><span style="font-size: x-small; font-family: 'Lucida Console'; color: #f5f5f5;">&nbsp;</span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: #012456; text-autospace: none;"><span style="font-size: x-small; font-family: 'Lucida Console'; color: #f5f5f5;">{</span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: #012456; text-autospace: none;"><span style="font-size: x-small; font-family: 'Lucida Console'; color: #f5f5f5;">&nbsp;</span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: #012456; text-autospace: none;"><span style="font-size: x-small; font-family: 'Lucida Console'; color: #f5f5f5;">$subnet.Subnet</span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: #012456; text-autospace: none;"><span style="font-size: x-small; font-family: 'Lucida Console'; color: #f5f5f5;">&nbsp;</span></p>
<p class="MsoNormal" style="margin-bottom: .0001pt; line-height: normal; background: #012456; text-autospace: none;"><span style="font-size: x-small; font-family: 'Lucida Console'; color: #f5f5f5;">} </span></p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Where would this be helpful? When you want to set up an NSG rule or forced tunneling for all the subnets, this comes in handy. I will do a separate post on NSGs and forced tunneling later on to explain in detail</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Happy PowerShelling</p>
<p class="MsoNormal">Anand Kumar R</p>
</div>]]></content:encoded>
    </item>
    <item>
      <title>Getting Started with Azure Government</title>
      <link>https://docs.microsoft.com/archive/blogs/ranand12/getting-started-with-azure-government</link>
      <pubDate>Mon, 28 Sep 2015 09:06:00 GMT</pubDate>
      <dc:creator><![CDATA[ranand12]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/ranand12/2015/09/28/getting-started-with-azure-government/</guid>
      <description><![CDATA[Update - 4/4/2017 - 
&nbsp;

This post is now redundant, all you have to use is the Environment...]]></description>
      <content:encoded><![CDATA[<h1><span style="font-size: 12px"> Update - 4/4/2017 - </span></h1>
&nbsp;

This post is now redundant, all you have to use is the Environment Variable --&gt;

&nbsp;

Add-AzureAccount -Environment AzureUSGovernment

&nbsp;

Yep ! Thats it :) For endpoint mapping - you can still use this reference or use Get-AzureEnvironment AzureUSGovernment to give you all the details

&nbsp;

<strong>Original Article</strong>

If you are just getting started with Azure government, you would have realized by now, that there are a few things which needs to be changed in order to get it working exactly like how it did in Azure Public. To begin with here are a couple of things, I will keep updating this post as and when I stumble upon newer things which needs change in order to work with Azure Government

&nbsp;
<h2><span style="text-decoration: underline">Azure Government PowerShell </span></h2>
&nbsp;

To get started with managing Azure Government using PowerShell, you would need to make a couple of modifications before actually running the <strong>Import-AzurePublishingSettings</strong> file
<ul>
 	<li><em>Add-AzureEnvironment -name “AzureGovernment” -PublishSettingsFileUrl “https://manage.windowsazure.us/publishsettings/index?client=xplat” -ServiceEndpoint “https://management.core.usgovcloudapi.net” -ManagementPortalUrl “https://manage.windowsazure.us” -StorageEndpoint “core.usgovcloudapi.net” -ActiveDirectoryEndpoint “https://login.windows.net/” -ActiveDirectoryServiceEndpointResourceId “https://management.core.usgovcloudapi.net/” -ResourceManagerEndpoint “https://management.usgovcloudapi.net” -GalleryEndpoint “https://gallery.usgovcloudapi.net” </em></li>
</ul>
<em> </em>
<ul>
 	<li><em>Set-AzureEnvironment “AzureGovernment”</em></li>
</ul>
<em> </em>
<ul>
 	<li>In order to download the publishing settings file, you would need to access the following URL - <a href="https://manage.windowsazure.us/publishsettings/index?client=xplat">https://manage.windowsazure.us/publishsettings/index?client=xplat</a></li>
 	<li>Once you have run the first two commands and downloaded the publishing settings file, you should be good to run the <strong>Import-AzurePublishingSettings</strong> command</li>
</ul>
&nbsp;
<h2><span style="text-decoration: underline">Endpoint Mapping</span></h2>
&nbsp;

The endpoints are slightly different for Azure Government when compared to Azure Public. Please refer below for the mapping.

&nbsp;

&nbsp;
<table style="width: 125px" border="1" cellspacing="0" cellpadding="0">
<thead>
<tr>
<td valign="top" width="137"><span style="text-decoration: underline">SERVICE TYPE</span></td>
<td valign="top" width="259"><span style="text-decoration: underline">AZURE PUBLIC</span></td>
<td valign="top" width="330"><span style="text-decoration: underline">AZURE GOVERNMENT</span></td>
</tr>
</thead>
<tbody>
<tr>
<td valign="top" width="137">Management Portal</td>
<td valign="top" width="259">manage.windowsazure.com</td>
<td valign="top" width="330">manage.windowsazure.us</td>
</tr>
<tr>
<td valign="top" width="137">General</td>
<td valign="top" width="259">*.windows.net</td>
<td valign="top" width="330">*.usgovcloudapi.net</td>
</tr>
<tr>
<td valign="top" width="137">Core</td>
<td valign="top" width="259">*.core.windows.net</td>
<td valign="top" width="330">*.core.usgovcloudapi.net</td>
</tr>
<tr>
<td valign="top" width="137">Compute</td>
<td valign="top" width="259">*.cloudapp.net</td>
<td valign="top" width="330">*.usgovcloudapp.net</td>
</tr>
<tr>
<td valign="top" width="137">Blob Storage</td>
<td valign="top" width="259">*.blob.core.windows.net</td>
<td valign="top" width="330">*.blob.core.usgovcloudapi.net</td>
</tr>
<tr>
<td valign="top" width="137">Queue Storage</td>
<td valign="top" width="259">*.queue.core.windows.net</td>
<td valign="top" width="330">*.queue.core.usgovcloudapi.net</td>
</tr>
<tr>
<td valign="top" width="137">Table Storage</td>
<td valign="top" width="259">*.table.core.windows.net</td>
<td valign="top" width="330">*.table.core.usgovcloudapi.net</td>
</tr>
<tr>
<td valign="top" width="137">Service Management</td>
<td valign="top" width="259">management.core.windows.net</td>
<td valign="top" width="330">management.core.usgovcloudapi.net</td>
</tr>
<tr>
<td valign="top" width="137">SQL Database</td>
<td valign="top" width="259">*.database.windows.net</td>
<td valign="top" width="330">*.database.usgovcloudapi.net</td>
</tr>
</tbody>
</table>
&nbsp;

&nbsp;

&nbsp;

For example, when trying to create a Storage context using PowerShell you would add the following switch <strong>–EndPoint:</strong>

&nbsp;
<pre class="scroll"><code class="cplusplus">$endpointsuffix = "core.usgovcloudapi.net"</code></pre>
New-AzureStorageContext –StorageAccountName $sourceStorageAcc -StorageAccountKey $sourceStoragKey <span style="background-color: #ffff00">-Endpoint $endpointsuffix</span>
<h2><span style="text-decoration: underline">Azure Media Services in Azure Government </span></h2>
In order to connect to Azure Media Services in Azure Government, the following changes need to be in place. All the below information can be retrieved when you click on Manage Keys under Azure Media Services.

While setting up the credentials:
<ul>
 	<li>
<pre class="scroll"><code class="csharp">_cachedCredentials = new MediaServicesCredentials(
 _mediaServicesAccountName,
 _mediaServicesAccountKey,
 _mediaContextScope,
 _acsBaseAddress);</code></pre>
<em></em>
<ul>
 	<li><strong>MediaContextScope --&gt;</strong><strong> "urn:WindowsAzureMediaServices"</strong></li>
 	<li><strong>_acsBaseAddress --&gt;</strong><strong> <a href="https://ams-usge-0-acs-global-1-1.accesscontrol.usgovcloudapi.net">https://ams-usge-0-acs-global-1-1.accesscontrol.usgovcloudapi.net</a></strong></li>
</ul>
</li>
</ul>
<ul>
 	<li>
<pre class="scroll"><code class="csharp">_context = new CloudMediaContext(new Uri(_apiServerAddress), _cachedCredentials);</code></pre>
<em></em>
<ul>
 	<li><strong>_apiServerAddress (for Virginia ) --&gt; </strong><strong><a href="https://ams-usge-1-hos-rest-1-1.usgovcloudapp.net/API/">https://ams-usge-1-hos-rest-1-1.usgovcloudapp.net/API/</a></strong></li>
 	<li><strong>_apiServerAddress (for Iowa) --&gt; </strong><strong> </strong><strong><a href="https://ams-usgc-1-hos-rest-1-1.usgovcloudapp.net/API/">https://ams-usgc-1-hos-rest-1-1.usgovcloudapp.net/API/</a></strong></li>
</ul>
</li>
</ul>
<strong> </strong>

Please do let me know if you have any questions in the comments section.

&nbsp;

Good Luck

Anand Kumar R]]></content:encoded>
    </item>
  </channel>
</rss>