< Back

Get-AzureRmSqlServerFirewallRule

Tue Jan 29, 2019 10:08 pm

NAME Get-AzureRmSqlServerFirewallRule



SYNOPSIS

Gets firewall rules for a SQL Database server.





SYNTAX

Get-AzureRmSqlServerFirewallRule [-ResourceGroupName] <String> [-ServerName] <String> [[-FirewallRuleName] <String>] [-DefaultProfile

<IAzureContextContainer>] [-Confirm] [-WhatIf] [<CommonParameters>]





DESCRIPTION

The Get-AzureRmSqlServerFirewallRule cmdlet gets firewall rules for an Azure SQL Database server. If you specify the name of a firewall rule, this

cmdlet gets information about that specific firewall rule.





PARAMETERS

-DefaultProfile <IAzureContextContainer>

The credentials, account, tenant, and subscription used for communication with azure



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-FirewallRuleName <String>

Specifies the name of the firewall rule.



Required? false

Position? 2

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ResourceGroupName <String>

Specifies the name of the resource group to which the SQL Server is assigned.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ServerName <String>

Specifies the name of the SQL Server.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Shows what would happen if the cmdlet runs. The cmdlet is not run.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None

This cmdlet does not accept any input.





OUTPUTS

Microsoft.Azure.Commands.Sql.FirewallRule.Model.AzureSqlServerFirewallRuleModel







NOTES









Example 1: Get all rules for a server



PS C:\\>Get-AzureRmSqlServerFirewallRule -ResourceGroupName "ResourceGroup01" -ServerName "Server01"

ResourceGroupName : ResourceGroup01

ServerName : server01

StartIpAddress : 0.0.0.0

EndIpAddress : 0.0.0.0

FirewallRuleName : AllowAllWindowsAzureIps



ResourceGroupName : ResourceGroup01

ServerName : Server01

StartIpAddress : 1.2.3.4

EndIpAddress : 4.3.2.1

FirewallRuleName : Rule01



This command gets all the firewall rules for the server named Server01.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... rewallrule

New-AzureRmSqlServerFirewallRule

Remove-AzureRmSqlServerFirewallRule

Set-AzureRmSqlServerFirewallRule

SQL Database Documentation https://docs.microsoft.com/azure/sql-database/