New-AzureSqlFirewallRule
New-AzureSqlFirewallRule
Creates a firewall rule for an Azure SQL Database server.
Syntax
Parameter Set: AzureIpRuleSet
New-AzureSqlFirewallRule [-ResourceGroupName] <System.String> [-ServerName] <System.String> [-AllowAllAzureIPs] [-Profile <Microsoft.Azure.Common.Authentication.Models.AzureProfile> ]
Parameter Set: UserSpecifiedRuleSet
New-AzureSqlFirewallRule [-ResourceGroupName] <System.String> [-ServerName] <System.String> -EndIpAddress <System.String> -FirewallRuleName <System.String> -StartIpAddress <System.String> [-Profile <Microsoft.Azure.Common.Authentication.Models.AzureProfile> ]
Detailed Description
The New-AzureSqlServerFirewallRule cmdlet creates a firewall rule for the specified Azure SQL Database server.
Parameters
-AllowAllAzureIPs
Indicates that this firewall rule enables all Azure IP addresses to access the server.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-EndIpAddress<System.String>
Specifies the end value of the IP address range for this rule.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-FirewallRuleName<System.String>
Specifies the name of the new firewall rule.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Profile<Microsoft.Azure.Common.Authentication.Models.AzureProfile>
Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-ResourceGroupName<System.String>
Specifies the name of a resource group that contains a server. This cmdlet creates a firewall rule on a server in the resource group that this cmdlet specifies.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
true(ByPropertyName) |
Accept Wildcard Characters? |
false |
-ServerName<System.String>
Specifies the name of a server. This cmdlet creates a firewall rule on the server that this cmdlet specifies. Specify the server name, not the fully qualified DNS name.
Aliases |
none |
Required? |
true |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
true(ByPropertyName) |
Accept Wildcard Characters? |
false |
-StartIpAddress<System.String>
Specifies the start value of the IP address range for the firewall rule.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
- System.String
Outputs
The output type is the type of the objects that the cmdlet emits.
- System.Object
Notes
- This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters.
Examples
Example 1: Create a firewall rule
This command creates a firewall rule named FirewallRule24 on the server named Server01. The rule includes the specified start and end IP addresses.
PS C:\> New-AzureSqlServerFirewallRule -ResourceGroupName "ResourceGroup11" -ServerName "Server01" -FirewallRuleName "FirewallRule24" -StartIpAddress "192.168.0.198" -EndIpAddress "192.168.0.199"
Related topics
Get-AzureSqlServerFirewallRule