I am trying to update what appears to be on the portal the "firewall rule for Connection Policy" from default to Proxy using a PowerShell script. Is there a cmdlet for this?

Wilson, Charles E 1 Reputation point
2020-10-15T19:49:40.86+00:00

I am looking for a ps1 script to update the Firewall Connection Policy to "Proxy" after I have created a SQL Server. I've found many settings updates to make in a script except this one. Any help (and sample script) would be much appreciated.

32771-azurefirewallconnectionpolicy.png

Azure Firewall
Azure Firewall
An Azure network security service that is used to protect Azure Virtual Network resources.
600 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. suvasara-MSFT 10,026 Reputation points
    2020-10-15T20:53:41.187+00:00

    @Wilson, Charles E , Here is the PowerShell block to update the sql server conn-policy,

        az sql server conn-policy update --connection-type {Default, Proxy, Redirect}  
                                         [--add]  
                                         [--force-string]  
                                         [--ids]  
                                         [--remove]  
                                         [--resource-group]  
                                         [--server]  
                                         [--set]  
                                         [--subscription]  
    

    ----------

    Please do not forget to "Accept the answer" wherever the information provided helps you to help others in the community.