Skip to content

Instantly share code, notes, and snippets.

@rdc-112
rdc-112 / UpdateAzureFirewallRule.ps1
Created September 22, 2020 21:19
Update SQL Server Firewall Rule Using Powershell
param
([Parameter(Mandatory)][string]$resourceGroupName,
[Parameter(Mandatory)][string]$sqlServerName,
[Parameter(Mandatory)][string]$ruleName)
<#
TODO:
- Add option to create firewall rule if it doesn't exist already
- Wrap wxternal method calls in try/catch blocks
- Add option to use PC name as rule name. Reduces the number of params that need to be provided
- Improve log messages