<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sarang Kulkarni on Medium]]></title>
        <description><![CDATA[Stories by Sarang Kulkarni on Medium]]></description>
        <link>https://medium.com/@sarangbk?source=rss-f6a6cff6c739------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*SFPfg1qacfwof13e.png</url>
            <title>Stories by Sarang Kulkarni on Medium</title>
            <link>https://medium.com/@sarangbk?source=rss-f6a6cff6c739------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 04:09:22 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sarangbk/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Configure Azure SQL Database firewall rules with PowerShell]]></title>
            <link>https://medium.com/rapidcircle/configure-azure-sql-database-firewall-rules-with-powershell-ef244c1ee710?source=rss-f6a6cff6c739------2</link>
            <guid isPermaLink="false">https://medium.com/p/ef244c1ee710</guid>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[powershell]]></category>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[azure]]></category>
            <dc:creator><![CDATA[Sarang Kulkarni]]></dc:creator>
            <pubDate>Tue, 19 Jul 2016 16:19:22 GMT</pubDate>
            <atom:updated>2016-07-19T16:40:19.532Z</atom:updated>
            <cc:license>http://creativecommons.org/licenses/by/4.0/</cc:license>
            <content:encoded><![CDATA[<p>19 July 2016</p><p>Living in the third world comes with its set of issues. I have a terrible pair of ISPs that I have to live with. One is Airtel 4g and the other is You Broadband. Both have a habit of refreshing the public IP every few hours (sometime even twice within an hour). I don’t get the logic. While everything else is fine since I use (and highly recommend) <a href="https://www.noip.com/">noIP.com</a>. However I am a Azure developer and my life depends on access to Azure SQL Database. With the frequent IP changes one constantly needs to keep a browser tab open with the Azure SQL Server settings open to be able to edit and save the newly assigned IP.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/532/0*aq7IBM4G1pTnNl73.png" /></figure><p>It takes about 4–5 clicks and a sagely amount of patience to do this. In the middle of a debug both can be hard to come by. I usually recommend the “Rule of three” for automating something.</p><blockquote><em>If you had to do the exact same task the third time, automate it. — master jatlh, ‘oH.</em></blockquote><p>So cooked up this little PowerShell script. For tl;dr crowd, you can go get it here.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3f407ce231dca90e52bab96ac233d912/href">https://medium.com/media/3f407ce231dca90e52bab96ac233d912/href</a></iframe><p>If you are still reading lets dig in. The script does some nifty things. First it gets your public IP. I found this cool no-nonsense HTTP endpoint at <a href="http://ifconfig.me/ip">IfConfig.me</a>. Hat-tip for a great name for the tool. Exactly does what it says. Returns a simple text response in body with your publicly visible IP. Here’s a fiddler trace showing all the gory details on the wire.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/0*atlvnv9d7v3lKhuA.png" /></figure><p>Then it checks if the given firewall rule name already exists, if it does that one is deleted and a new one is created. I needed this as I constantly need to update the settings and there are few of us devs using the same DB and all have their own firewall rules.</p><p>One thing to note is I have removed the PowerShell <strong>Confirm</strong> dialog from the <strong>Remove-AzureRmSqlServerFirewallRule</strong> commandlet. I know what I am doing and didn’t need the pesky prompts. If you are worried of accidentally removing a rule remove the <strong>-Force</strong> parameter from the command. This script also ignores errors if any.</p><p>Next up, making sure this scripts gets called from a batch file whose icon sits happily in your taskbar. But that’s for another post.</p><p><strong>Ref:</strong> <br> <a href="https://msdn.microsoft.com/en-us/library/mt603588.aspx">Remove-AzureRmSqlServerFirewallRule</a> <br> <a href="https://msdn.microsoft.com/en-us/library/mt603860.aspx">New-AzureRmSqlServerFirewallRule</a></p><p><em>Originally published at </em><a href="http://sarangk.com/configure-azure-sql-database-firewall-rules-with-powershell/"><em>sarangk.com</em></a><em> on July 19, 2016.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ef244c1ee710" width="1" height="1" alt=""><hr><p><a href="https://medium.com/rapidcircle/configure-azure-sql-database-firewall-rules-with-powershell-ef244c1ee710">Configure Azure SQL Database firewall rules with PowerShell</a> was originally published in <a href="https://medium.com/rapidcircle">Rapid Circle</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>