New-AzureSqlDatabaseServerFirewallRule
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
New-AzureSqlDatabaseServerFirewallRule
Creates a new firewall rule in the specified Windows Azure SQL Database Server in the current subscription.
Syntax
Parameter Set: IpRange
New-AzureSqlDatabaseServerFirewallRule [-ServerName] <String> -EndIpAddress <String> -RuleName <String> -StartIpAddress <String> [-Force] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: AllowAllAzureServices
New-AzureSqlDatabaseServerFirewallRule [-ServerName] <String> -AllowAllAzureServices [-Force] [-RuleName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The New-AzureSqlDatabaseServerFirewallRule cmdlet creates a new firewall rule in the specified SQL Database Server.
Use the cmdlet with the IpRange parameter set to allow any IP address within the range specified in the StartIpAddress and EndIpAddress parameters to connect to the SQL Database Server.
Use the cmdlet with the AllowAllAzureServices parameter set to allow Windows Azure connections to the SQL Database Server. A firewall rule with starting and ending IP addresses equal to 0.0.0.0 will be created. If you do not specify a firewall rule name, a firewall rule with default name “AllowAllAzureServices” will be created.
Parameters
-AllowAllAzureServices
Allows Windows Azure connections to the SQL Database Server.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-EndIpAddress<String>
End value of the IP address range.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Force
Allows the action to complete without prompting you for confirmation.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-RuleName<String>
New SQL Database firewall rule name.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-ServerName<String>
The name of the SQL Database Server where the new firewall rule is created. Specify only the server name, and not the fully qualified DNS name.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-StartIpAddress<String>
Start value of the IP address range.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Confirm
Prompts you for confirmation before executing the command.
Required? |
false |
Position? |
named |
Default Value |
|
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-WhatIf
Describes what would happen if you executed the command without actually executing the command.
Required? |
false |
Position? |
named |
Default Value |
|
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
- Microsoft.WindowsAzure.Management.SqlDatabase.Model.SqlDatabaseServerFirewallRuleContext
Examples
-------------- Example 1 --------------
This command creates a new firewall rule (“myRule1”) in the specified SQL Database Server (“lpqd0zbr8y”) with the specified IP range values.
PS C:\> New-AzureSqlDatabaseServerFirewallRule -ServerName "lpqd0zbr8y" -RuleName "myRule1" -StartIpAddress 12.1.1.1 -EndIpAddress 12.1.1.2
-------------- Example 2 --------------
This command creates a new firewall rule (“myRule2”) in the specified SQL Database Server (“lpqd0zbr8y”) to allow Windows Azure connections.
PS C:\> New-AzureSqlDatabaseServerFirewallRule -ServerName "lpqd0zbr8y" -AllowAllAzureServices -RuleName "myRule2"
-------------- Example 3 --------------
This command creates a new firewall rule with the default firewall rule name (“AllowAllAzureServices”) in the specified SQL Database Server (“lpqd0zbr8y”) to allow Windows Azure connections.
PS C:\> New-AzureSqlDatabaseServerFirewallRule -ServerName "lpqd0zbr8y" -AllowAllAzureServices
Related topics
Get-AzureSqlDatabaseServerFirewallRule