Remove-AzNetworkInterfaceIpConfig

Removes a network interface IP configuration from a network interface.

Syntax

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

Description

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

Examples

1: Delete an IP configuration from a network interface

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

Remove-AzNetworkInterfaceIpConfig -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:Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
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
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
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Inputs

PSNetworkInterface

Outputs

PSNetworkInterface

Notes

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