Get-AzureSqlDatabaseServerFirewallRule
Gets firewall rules for Azure SQL Database Server.
Note
The cmdlets referenced in this documentation are for managing legacy Azure resources that use Azure Service Manager (ASM) APIs. This legacy PowerShell module isn't recommended when creating new resources since ASM is scheduled for retirement. For more information, see Azure Service Manager retirement.
The Az PowerShell module is the recommended PowerShell module for managing Azure Resource Manager (ARM) resources with PowerShell.
Syntax
Default (Default)
Get-AzureSqlDatabaseServerFirewallRule
-ServerName <String>
[-RuleName <String>]
[-Profile <AzureSMProfile>]
[<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.
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.
Parameter properties
Type: | AzureSMProfile |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-RuleName
Specifies the name of the firewall rule that this cmdlet gets.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-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.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.