Halloween is over but the the world is still a scary place. In a continuation of a thought from an article I wrote a few weeks back for Auditing AzureSQL Firewall Policies, I thought I would also include a short function for auditing azure storage accounts that are currently configured for “public” access.

I periodically review Azure PaaS resource edge security. As a part of that process I examine and cleanup AzureSQL firewall rules. Once you have more than a handful of subscriptions and AzureSQL databases, doing this manually starts becoming unfeasible. To that end, Azure Powershell is your friend…

As is typical, you need to install the Powershell AZ module on your workstation, after that you need to run.


Then supply your Azure credentials (preferably creds that have the ability to view and manage all of your AzureSQL databases and firewall rules, otherwise the rest is moot.

The current state of the world has caused some unique stresses on IT infrastructure. For IT departments servicing internal teams, remote access infrastructure in particular has felt the brunt of the blow. To that end, I spent a couple of weeks testing out enterprise VPN solutions.

I have been using Powershell to manage pieces of Azure on and off for about a year and half now. I had heard tell of Azure Automation but never really had a good reason to justify spending the time climbing that particular mountain (hill really…).

Then the request came through… let’s scale AzureSQL databases up and down based on time of day for a given project… If you have worked in Azure you know Microsoft has built in a fairly robust and relatively easy to use auto scale-out configuration interface for Azure App services. Not so for “up/down” scale operations (increasing/decreasing the size of a single-instance). Hence, my foray into Azure Automation.

I have done a fair bit of Azure Powershell scripting just using the ISE interface and keeping scripts on my desktop. I started out with “AzureRM” and migrated to “AZ” as Microsoft starting a couple of years ago pretty much said “AZ” is the future… switch now.

With that background in place, I will state that I found starting out on Azure Automation to be a bit of a bumpy ride. I wanted to hopefully save you the reader some of the time I spent chasing my tail…