Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
Add-AzLoadBalancerFrontendIpConfig
- Module:
- Az.Network Module
Adds a front-end IP configuration to a load balancer.
Syntax
SetByResourceSubnet (Default)
Add-AzLoadBalancerFrontendIpConfig
-LoadBalancer <PSLoadBalancer>
-Name <String>
-Subnet <PSSubnet>
[-PrivateIpAddress <String>]
[-PrivateIpAddressVersion <String>]
[-Zone <String[]>]
[-GatewayLoadBalancerId <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
SetByResourceIdSubnet
Add-AzLoadBalancerFrontendIpConfig
-LoadBalancer <PSLoadBalancer>
-Name <String>
-SubnetId <String>
[-PrivateIpAddress <String>]
[-PrivateIpAddressVersion <String>]
[-Zone <String[]>]
[-GatewayLoadBalancerId <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
SetByResourceIdPublicIpAddress
Add-AzLoadBalancerFrontendIpConfig
-LoadBalancer <PSLoadBalancer>
-Name <String>
-PublicIpAddressId <String>
[-Zone <String[]>]
[-GatewayLoadBalancerId <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
SetByResourcePublicIpAddress
Add-AzLoadBalancerFrontendIpConfig
-LoadBalancer <PSLoadBalancer>
-Name <String>
-PublicIpAddress <PSPublicIpAddress>
[-Zone <String[]>]
[-GatewayLoadBalancerId <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
SetByResourceIdPublicIpAddressPrefix
Add-AzLoadBalancerFrontendIpConfig
-LoadBalancer <PSLoadBalancer>
-Name <String>
-PublicIpAddressPrefixId <String>
[-Zone <String[]>]
[-GatewayLoadBalancerId <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
SetByResourcePublicIpAddressPrefix
Add-AzLoadBalancerFrontendIpConfig
-LoadBalancer <PSLoadBalancer>
-Name <String>
-PublicIpAddressPrefix <PSPublicIpPrefix>
[-Zone <String[]>]
[-GatewayLoadBalancerId <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Add-AzLoadBalancerFrontendIpConfig cmdlet adds a front-end IP configuration to an Azure load balancer.
Examples
Example 1 Add a front-end IP configuration with a dynamic IP address
$Subnet = Get-AzVirtualNetwork -Name "MyVnet" -ResourceGroupName "MyRg" | Get-AzVirtualNetworkSubnetConfig -Name "MySubnet"
Get-AzLoadBalancer -Name "MyLB" -ResourceGroupName "NrpTest" | Add-AzLoadBalancerFrontendIpConfig -Name "FrontendName" -Subnet $Subnet | Set-AzLoadBalancer
The first command gets the Azure virtual network named MyVnet and passes the result using the pipeline to the Get-AzVirtualNetworkSubnetConfig cmdlet to get the subnet named MySubnet. The command then stores the result in the variable named $Subnet. The second command gets the load balancer named MyLB and passes the result to the Add-AzLoadBalancerFrontendIpConfig cmdlet that adds a front-end IP configuration to the load balancer with a dynamic private IP address from the subnet stored in the variable named $MySubnet.
Example 2 Add a front-end IP configuration with a static IP address
$Subnet = Get-AzVirtualNetwork -Name "MyVnet" -ResourceGroupName "RG001" | Get-AzVirtualNetworkSubnetConfig -Name "MySubnet"
Get-AzLoadBalancer -Name "MyLB" -ResourceGroupName "NrpTest" | Add-AzLoadBalancerFrontendIpConfig -Name "FrontendName" -Subnet $Subnet -PrivateIpAddress "10.0.1.6" | Set-AzLoadBalancer
The first command gets the Azure virtual network named MyVnet and passes the result using the pipeline to the Get-AzVirtualNetworkSubnetConfig cmdlet to get the subnet named MySubnet. The command then stores the result in the variable named $Subnet. The second command gets the load balancer named MyLB and passes the result to the Add-AzLoadBalancerFrontendIpConfig cmdlet that adds a front-end IP configuration to the load balancer with a static private IP address from the subnet stored in the variable named $Subnet.
Example 3 Add a front-end IP configuration with a public IP address
$PublicIp = Get-AzPublicIpAddress -ResourceGroupName "myRG" -Name "MyPub"
Get-AzLoadBalancer -Name "MyLB" -ResourceGroupName "NrpTest" | Add-AzLoadBalancerFrontendIpConfig -Name "FrontendName" -PublicIpAddress $PublicIp | Set-AzLoadBalancer
The first command gets the Azure public IP address named MyPub and stores the result in the variable named $PublicIp. The second command gets the load balancer named MyLB and passes the result to the Add-AzLoadBalancerFrontendIpConfig cmdlet that adds a front-end IP configuration to the load balancer with public IP address stored in the variable named $PublicIp.
Example 4 Add a front-end IP configuration with a public IP prefix
$PublicIpPrefix = Get-AzPublicIpPrefix -ResourceGroupName "myRG" -Name "MyPubPrefix"
Get-AzLoadBalancer -Name "MyLB" -ResourceGroupName "NrpTest" | Add-AzLoadBalancerFrontendIpConfig -Name "FrontendName" -PublicIpAddressPrefix $PublicIpPrefix | Set-AzLoadBalancer
The first command gets the Azure public IP prefix named MyPubPrefix and stores the result in the variable named $PublicIpPrefix. The second command gets the load balancer named MyLB and passes the result to the Add-AzLoadBalancerFrontendIpConfig cmdlet that adds a front-end IP configuration to the load balancer with public IP prefix stored in the variable named $PublicIpPrefix.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | cf |
Parameter sets
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Parameter properties
| Type: | IAzureContextContainer |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
Parameter sets
-GatewayLoadBalancerId
The reference of Gateway LoadBalancer Provider resource.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-LoadBalancer
Specifies a LoadBalancer object. This cmdlet adds a front-end IP configuration to the load balancer that this parameter specifies.
Parameter properties
| Type: | PSLoadBalancer |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Name
Specifies the name of the front-end IP configuration to add.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-PrivateIpAddress
Specifies the private IP address to associate with a front-end IP configuration.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-PrivateIpAddressVersion
The private IP address version of the IP configuration.
Parameter properties
| Type: | String |
| Default value: | None |
| Accepted values: | IPv4, IPv6 |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-PublicIpAddress
Specifies the public IP address to associate with a front-end IP configuration.
Parameter properties
| Type: | PSPublicIpAddress |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-PublicIpAddressId
Specifies the ID of the public IP address in which to add a front-end IP configuration.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-PublicIpAddressPrefix
Specifies the public ip address prefix object to associate with a front-end IP configuration.
Parameter properties
| Type: | PSPublicIpPrefix |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-PublicIpAddressPrefixId
Specifies the ID of the public ip address prefix object to associate with a front-end IP configuration.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Subnet
Specifies the subnet object in which to add a front-end IP configuration.
Parameter properties
| Type: | PSSubnet |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-SubnetId
Specifies the ID of the subnet in which to add a front-end IP configuration.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | wi |
Parameter sets
-Zone
A list of availability zones denoting the IP allocated for the resource needs to come from.
Parameter properties
| Type: | String[] |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
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.
Inputs
PSLoadBalancer
String
String
PSSubnet
PSPublicIpAddress
Outputs
PSLoadBalancer
Related Links
Azure PowerShell
Feedback
Was this page helpful?
