Get-​Azure​Sql​Database​Server​Firewall​Rule

Gets firewall rules for Azure SQL Database Server.

Syntax

Get-AzureSqlDatabaseServerFirewallRule
   [-Profile <AzureSMProfile>]
   [-RuleName <String>]
   -ServerName <String>
   [<CommonParameters>]

Description

The Get-AzureSqlDatabaseServerFirewallRule cmdlet gets firewall rules for an instance of Azure SQL Database Server. If you specify a firewall rule by name, this cmdlet returns information about that firewall rule. Otherwise, the cmdlet returns information about all the firewall rules on the specified Azure SQL Database server.

Examples

Example 1: Get all firewall rules on a server

PS C:\> Get-AzureSqlDatabaseServerFirewallRule -ServerName "lpqd0zbr8y"

This command gets all the firewall rules on the Azure SQL Database server named lpqd0zbr8y.

Example 2: Get a firewall rule by using its name

PS C:\> Get-AzureSqlDatabaseServerFirewallRule -ServerName "lpqd0zbr8y" -RuleName "FirewallRule24"

This command gets the firewall rule named FirewallRule24 on the server named lpqd0zbr8y.

Required Parameters

-ServerName

Specifies the name of a server. This cmdlet gets firewall rules from the server that this parameter specifies. Specify the server name, not the fully qualified DNS name.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-Profile

Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.

Type:AzureSMProfile
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RuleName

Specifies the name of the firewall rule that this cmdlet gets.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Inputs

Microsoft.WindowsAzure.Commands.SqlDatabase.Model.SqlDatabaseServerFirewallRuleContext

Outputs

IEnumerable\<Microsoft.WindowsAzure.Commands.SqlDatabase.Model.SqlDatabaseServerFirewallRuleContext\>