Remove-AzureRmNetworkInterfaceIpConfig

Removes a network interface IP configuration from a network interface.

Warning

The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.

Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.

Syntax

Remove-AzureRmNetworkInterfaceIpConfig
      -Name <String>
      -NetworkInterface <PSNetworkInterface>
      [-DefaultProfile <IAzureContextContainer>]
      [<CommonParameters>]

Description

The Remove-AzureRmNetworkInterfaceIpConfig cmdlet removes a network interface IP configuration from an Azure network interface.

Examples

1: Delete an IP configuration from a network interface

$nic = Get-AzureRmNetworkInterface -Name mynic -ResourceGroupName myrg

Remove-AzureRmNetworkInterfaceIpConfig -Name IPConfig-1 -NetworkInterface $nic

The first command gets a network interface called mynic and stores it in the variable $nic. The second command removes the IP configuration called IPConfig-1 associated with this network interface.

Parameters

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

Type:IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Specifies the name of the network interface IP configuration to remove.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-NetworkInterface

Specifies a NetworkInterface object. This object contains the network interface IP configuration to remove.

Type:PSNetworkInterface
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

Inputs

PSNetworkInterface

Parameters: NetworkInterface (ByValue)

Outputs

PSNetworkInterface

Notes

  • Keywords: azure, azurerm, arm, resource, management, manager, network, networking