Remove-AzVirtualNetworkGatewayNatRule
Removes or Delete a Virtual Network Gateway NatRule.
Syntax
Remove-AzVirtualNetworkGatewayNatRule
-ResourceGroupName <String>
-ParentResourceName <String>
-Name <String>
[-Force]
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Remove-AzVirtualNetworkGatewayNatRule
-ResourceId <String>
[-Force]
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Remove-AzVirtualNetworkGatewayNatRule
-InputObject <PSVirtualNetworkGatewayNatRule>
[-Force]
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Remove-AzVirtualNetworkGatewayNatRule cmdlet removes a virtual network gateway nat rule from your virtual network gateway.
Examples
Example 1
Remove-AzVirtualNetworkGatewayNatRule -ResourceGroupName rg1 -ParentResourceName gw1 -Name natRule3
Confirm
Are you sure you want to remove resource 'natRule3'
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Y
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Force
Do not ask for confirmation if you want to delete a resource
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
The VirtualNetworkGatewayNatRule object to update.
Type: | PSVirtualNetworkGatewayNatRule |
Aliases: | VirtualNetworkGatewayNatRule |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
The resource name.
Type: | String |
Aliases: | ResourceName, VirtualNetworkGatewayNatRuleName |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ParentResourceName
The parent resource name.
Type: | String |
Aliases: | ParentVirtualNetworkGatewayName, VirtualNetworkGatewayName |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PassThru
Returns an object representing the item on which this operation is being performed.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
The resource group name.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceId
The resource id of the VirtualNetworkGatewayNatRule object to delete.
Type: | String |
Aliases: | VirtualNetworkGatewayNatRuleId |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
PSVirtualNetworkGatewayNatRule
Outputs
Azure PowerShell