Edit

Share via


Remove-AzLoadBalancerInboundNatRuleConfig

Removes an inbound NAT rule configuration from a load balancer.

Syntax

Default (Default)

Remove-AzLoadBalancerInboundNatRuleConfig
    -LoadBalancer <PSLoadBalancer>
    [-Name <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Remove-AzLoadBalancerInboundNatRuleConfig cmdlet removes an inbound network address translation (NAT) rule configuration from an Azure load balancer.

Examples

Example 1: Delete an inbound NAT rule from an Azure load balancer

$loadbalancer = Get-AzLoadBalancer -Name mylb -ResourceGroupName myrg

Remove-AzLoadBalancerInboundNatRuleConfig -Name "myinboundnatrule" -LoadBalancer $loadbalancer

The first command loads an already existing load balancer called "mylb" and stores it in the variable $load balancer. The second command removes the inbound NAT rule associated with this load balancer.

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

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-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

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-LoadBalancer

Specifies the LoadBalancer object that contains the inbound NAT rule configuration that this cmdlet removes.

Parameter properties

Type:PSLoadBalancer
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-Name

Specifies the name of the inbound NAT rule configuration that this cmdlet removes.

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:False
Value from remaining arguments:False

-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

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
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.

Inputs

PSLoadBalancer

Outputs

PSLoadBalancer